2 * Firmata is a generic protocol for communicating with microcontrollers
3 * from software on a host computer. It is intended to work with
4 * any host computer software package.
6 * To download a host software package, please click on the following link
7 * to open the list of Firmata client libraries in your default browser.
9 * https://github.com/firmata/arduino#firmata-client-libraries
12 /* This sketch accepts strings and raw sysex messages and echos them back.
14 * This example code is in the public domain.
18 void stringCallback(char *myString)
20 Firmata.sendString(myString);
24 void sysexCallback(byte command, byte argc, byte *argv)
26 Firmata.sendSysex(command, argc, argv);
31 Firmata.setFirmwareVersion(FIRMATA_FIRMWARE_MAJOR_VERSION, FIRMATA_FIRMWARE_MINOR_VERSION);
32 Firmata.attach(STRING_DATA, stringCallback);
33 Firmata.attach(START_SYSEX, sysexCallback);
39 while (Firmata.available()) {
40 Firmata.processInput();