2 Ardunios connection via USB

Hello,

I have a smarthome setup with 2 Arduino Megas connected via USB (need lots of input/output pins).
But the problem is that I can only connect one Arduino via Firmata module.
Has anybody an idea how I can may connect a second Arduino also using Firmata integration?
Maybe a custom Firmata2 component can be used but I have no idea how to create that.
If somebody can help I would really appreciate it.
thank you

I think, you have to add another - serial-port: entry after your first one. Like this:

firmata:
  - serial_port: /dev/serial/by-id/usb-Teensyduino_USB_Serial_358320-if00
    serial_baud_rate: 57600
    switches:
      - name: my_light
        pin_mode: OUTPUT
        pin: 4
        negate: true
  - serial-port: 
    serial_baud_rate: 57600
    switches:
      - name: my_second_light
        pin_mode: OUTPUT
        pin: 4
        negate: true
      - name: my_other_output
        pin_mode: OUTPUT
        pin: 5
        initial: true
1 Like

Hi tenn0,

cool thing it looks like that did the job!
many thanks!

1 Like