The Firmata Component has moved into the Palette starting with build 088.50180
attached is a little experiment to send and receive stuff to and from the Arduino using the Firmata API.
Firmata seems essentially to be an Arduino sketch which let’s yuo configure and control the Arduino using messages formated as Midi. A good introdction for whoever is interested can be found here: firmata.org/wiki/Protocol
So what does it let you do? Well, first:
- hook up your Arduino
- upload the StandardFirmata Sketch from the Examples/Firmata folder
- after successful upload start the attached TouchDesigner toe and go into /project1/firmata and select the right COM Port on the serial1 DAT
- toggle thee Active Parameter of the serial1 DAT off and on --> you should be seeing messages coming into the serial1 DAT
now go one level up to /project1, here you find:
- a pinCapabilities DAT telling you what each pin of your Board can act as
- a pinSettings DAT telling you what each pin is currently set to
- a firmataVersion DAT informing you off the Firmata Sketch and Version uploaded to the Arduino as well as
- an analogValues and digitalValues CHOP, showing you the pins output
on the input side to the firmata COMP you find:
- a constant CHOP called values to set pins to certain values
- a constant CHOP called mode to tell the pin what it should act as (there is a Table DAT called modes docked to the firmata COMP informing you of what value maps to what mode)
- as well as a Report Analog and a Report Digital Button which enable feedback from the Arduino to TouchDesigner.
Not yet implemented are the I2C and Shift Modes, if anybody has information on how to do that best, I’d be really interested to see this working
Also I ran into a problem with my Arduino Mega, not all pins would report correctly, wonder if my mega somehow is faulty? Further when connecting a servo I had sitting here for a long time, the Arduino would reset, so the servo functionality is not fully tested yet.
If you like to further develop the extension or this patch, the Firmata class sits in /project1/firmata/local/modules/firmata
Anyhow. I hope this is good use for some people. Firmata seems to be great to get a quickstart in using the Arduino as a pure input/output converter for all kinds of Sensors and Devices and keep all the logic inside TouchDesigner.