Setting up an Arduino or compatible microcontroller as a Firmata device
Install and launch the Arduino IDE.
(Optional, but recommended) For full compatibility with all features of MWorks' Firmata interface, install the latest version of the Firmata library with MWorks extensions: Download and decompress the source code, change the name of the source folder to "Firmata", and move it to
Connect the board to your computer via its USB cable.
Go to Tools → Board, and select the board you're using. If you don't see your board listed, you may need to install a core for it.
Under Tools → Port, select the port that has your board's name next to it in parentheses.
The next step depends on how you'll be connecting to your board from the machine running MWorks. If you'll be...
a. connecting from a Mac via a USB cable (i.e. a serial-via-USB connection), open File → Examples → Firmata → StandardFirmata.
b. connectiing from a Mac or iPad via Bluetooth Low Energy (BLE), open File → Examples → Firmata → StandardFirmataBLE. Click on the tab for file
bleConfig.h, and make any necessary changes to
FIRMATA_BLE_LOCAL_NAMEand other options.
Click the "Upload" button (rightward-pointing arrow). This will compile and upload the StandardFirmata or StandardFirmataBLE code to your board.
Disconnect the board from your computer, and quit the Arduino IDE.
At this point, your board should be ready to use as a Firmata device. To test it, reconnect it to your computer via its USB cable, and try running the Firmata blink demo experiment. This experiment toggles the state of digital pin 13 (typically connected to a built-in LED) every 500ms. If you're connecting via BLE, be sure to set the value of the macro
bluetooth_local_name to the string you used as