Firmata is an Arduino sketch allowing for configuration and control of the Arduino using messages formatted as MIDI.
More information on the firmata protocol can be found here: https://github.com/firmata/protocol
See also https://jmarsico.github.io/rsma2019/tutorials/td_arduino/
- Install the latest Arduino IDE on your computer and connect your Arduino board.
- In the Arduino IDE, under `File`, select `Examples>Firmata>Standard Firmata` and upload it to your board.
- Close the IDE and select the port your Arduino is conencted to on the firmata COMP's
- Toggle the
Activeparameter. The component will attempt to communicate with the Arduino and create all necessary parameters for pin-modes and pin-values.
- Via the now available
Pin Valuespages, setup and control your Arduino.
- The CHOP output form the component contains all pin values.
Parameters - Firmata Page
Firmatatype - When connecting to an Arduino, will display the name of the sketch uploaded to the Arduino.
Firmataversion - When connecting to an Arduino, will display the version of Firmata uploaded to the Arduino.
Active - Toggle on to start communicating with the Arduino.
Port - Select the COM Port the Arduino is connected to.
Baudrate - Set the Baud Rate of the selected COM Port.
Reset - Reset the firmata Component to it's original empty state.
Queryver - Query the Firmata version uploaded to the Arduino.
Query Board Capabilities
Querycap - Query the supported modes and resolution of all pins.
Query Pin States
Querystates - Query the pins' current mode and state (different than value).
Query Analog Mapping
Queryanalog - Ask for the mapping of analog to pin numbers.
Report All Analog Pins
Reportanalog - Toggle on to report all analog pin values.
Report All Digital Ports
Reportdigital - Toggle on to report all digital pin values.
Samplinginterval - Set the interval at which analog input is sampled (default = 19ms).
Parameters - Pin Modes Page
This will contain as many menu parameters as available pins on the Arduino with the available modes for each pin respectively. Possible modes can be:
Modepin2 - Select the operating mode for this pin.
Parameters - Pin Values Page
This page will contain a number of Pin Values either to set the values or display the reported values. If reporting values, the respective parameters will be in read-only mode. For digital pins, enabling reporting is only possible on a per-port basis with pins being grouped in up to 8 pin blocks.
Reportport0 - Enable Reporting for this Pin or Port.
Valpin2 - Get or set the current value of the pin.
Parameters - Servo Page
Minpulse - The Servo's minimum pulse length for the minimum angle.
Maxpulse - The Servo's maximum pulse length for the maximum angle.
Parameters - About Page
Help - Opens this page.
Version - The current version of the component.
.tox Save Build
Toxsavebuild - THe TouchDesigner build this component was saved with.
- Output 0 - A CHOP containing all pin values.