- Code: Select all
fgcommand("add-io-channel", {"config": "generic,serial,in,30,/dev/ttyUSB0,38400,myprotocol", "name":"test"} );
To remove the io channel, run
- Code: Select all
fgcommand("remove-io-channel", {"name":"test"} );
Another tip: I have experienced problem if the Arduino IDE's Serial Monitor is open (locking the device). The Arduino IDE can be running, but close the serial monitor before starting FG.