firmata / firmata.js

JavaScript implementation of the Firmata protocol
710 stars 147 forks source link

Cant connect to device #265

Open ale-novo opened 1 year ago

ale-novo commented 1 year ago

Hello, im trying to use firmata js

i have flashed my arduino compatible device with a sketch generated from firmatabuilder.com Protocol version is 2.6.0 and firmware version is 2.10.1 (ConfigurableFirmata)

my device is '/dev/serial/by-id/usb-Arduino_RaspberryPi_Pico_577461E62A4515DF-if00' and baud rate 115200

im able to connect using the perl-firmata client library and it works fine.

However i cant seem to make the firmata js examples connect.

I dont understand where to specify the device and baudrate in the examples.

Can someone please explain how to set the device and baudrate in one of the examples to connect via USB (serial) ?

thanks a lot.

awong1900 commented 1 year ago

Try like this:

  const board = new Board(port.path, {
    serialport: {
      baudRate: 115200,
    },
  });