Arduino board with StandardFirmata doesn't respond to C# client

40 Views Asked by At

I have a Seeeduino XIAO board with Firmata running on it. I'm currently trying to write C# client to communicate with this board. I have tried using Iot.Device.Arduino and SolidSolis.Arduino for that purpose but I'm struggling with problem - board doesn't respond to any requests sent by my app.

However, when I use Windows Remote Arduino Experience app, board is being successfuly found and I can control pins, retrieve info etc. Screenshot 1 Screenshot 2

  • I use this code to communicate with board:
using Iot.Device.Arduino;

var arduino = new ArduinoBoard("COM3", 57600);
arduino.SoftwareReset();
Console.WriteLine(arduino.FirmataVersion.Major); // This throws System.TimeoutException
#elif defined(SEEED_XIAO_M0)
#define TOTAL_ANALOG_PINS 11
#define TOTAL_PINS 17 // 11 digital / analog + 1 DAC output + 2 i2c + 3 spi
#define VERSION_BLINK_PIN LED_BUILTIN
#define PIN_SERIAL1_RX 7
#define PIN_SERIAL1_TX 6
#define IS_PIN_DIGITAL(p) ((p) >= 0 && (p) <= 10)
#define IS_PIN_ANALOG(p) ((p) >= 0 && (p) <= 10)
#define IS_PIN_PWM(p) ((p) >= 1 && (p) <= 10)
#define IS_PIN_SERVO(p) (IS_PIN_DIGITAL(p) && (p) < MAX_SERVOS) // deprecated since v2.4
#define IS_PIN_I2C(p) ((p) == 4 || (p) == 5) // SDA = 4, SCL = 5
#define IS_PIN_SPI(p) ((p) == 4 || (p) == 10 || (p) == 9 || (p) == 8) // SS = A4
#define IS_PIN_SERIAL(p) ((p) == 6 || (p) == 7)
#define PIN_TO_DIGITAL(p) (p)
#define PIN_TO_ANALOG(p) (p)
#define PIN_TO_PWM(p) PIN_TO_DIGITAL(p)
#define PIN_TO_SERVO(p) (p) // deprecated since v2.4

P.S. How do I know that the board is not responding and it's not the app that doesn't work? The board has RX and TX leds, RX one blinks always but TX blinks only when I use Windows Remote Arduino Experience app.

What I am doing wrong? Is there any error in setup or code I've written?

0

There are 0 best solutions below