Palette:firmata

From Derivative
Jump to navigation Jump to search

Summary
[edit]

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/

PythonIcon.pngPalette:firmata Ext


Getting Started

  • 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 Port parameter.
  • Toggle the Active parameter. 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 Modes and Pin Values pages, setup and control your Arduino.
  • The CHOP output form the component contains all pin values.


Parameters - Firmata Page

Firmata Type Firmatatype - When connecting to an Arduino, will display the name of the sketch uploaded to the Arduino.

Firmata Version Firmataversion - When connecting to an Arduino, will display the version of Firmata uploaded to the Arduino.

Active Active - Toggle on to start communicating with the Arduino.

Port Port - Select the COM Port the Arduino is connected to.

Baud Rate Baudrate - Set the Baud Rate of the selected COM Port.

Reset Reset - Reset the firmata Component to it's original empty state.

Query Version 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.

Sampling Interval 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:

  • DIGITAL_INPUT
  • DIGITAL_OUTPUT
  • ANALOG_INPUT
  • PWM
  • SERVO
  • SHIFT
  • I2C
  • ONEWIRE
  • STEPPER
  • ENCODER
  • SERIAL
  • INPUT_PULLUP

Pin 2 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.

Enable Reporting Reportport0 - Enable Reporting for this Pin or Port.

Pin 2 Valpin2 - Get or set the current value of the pin.


Parameters - Servo Page

Min Pulse Minpulse - The Servo's minimum pulse length for the minimum angle.

Max Pulse Maxpulse - The Servo's maximum pulse length for the maximum angle.


Parameters - About Page

Help Help - Opens this page.

Version Version - The current version of the component.

.tox Save Build Toxsavebuild - THe TouchDesigner build this component was saved with.


Operator Outputs

  • Output 0 - A CHOP containing all pin values.

TouchDesigner Build:

Palette
Palette • Palette:arcBallCamera • Palette:arcBallGeometry • Palette:audioAnalysis • Palette:audioSet • Palette:battery • Palette:bitwigClip • Palette:bitwigClipSlot • Palette:bitwigDeviceRemotes • Palette:bitwigMain • Palette:bitwigNote • Palette:bitwigProjectRemotes • Palette:bitwigRemotesDevice • Palette:bitwigRemotesProject • Palette:bitwigRemotesTrack • Palette:bitwigSelect • Palette:bitwigSong • Palette:bitwigTrack • Palette:bitwigTrackRemotes • Palette:blendModes • Palette:bloom • Palette:camera • Palette:cameraBrowser • Palette:cameraViewport • Palette:camSchnappr • Palette:changeColor • Palette:changeToColor • Palette:checker • Palette:chromaKey • Palette:colorThreshold • Palette:compareComp • Palette:convolve • Palette:cornerPinSOP • Palette:cppParsTemplateGen • Palette:customAttributes • Palette:debugControl • Palette:dent • Palette:depthExtract • Palette:dilate • Palette:encoder • Palette:equalizer • Palette:feedback • Palette:feedbackEdge • Palette:firmata • Palette:gal • Palette:geoPanel • Palette:gestureCapture • Palette:graphPlot • Palette:histogram • Palette:hsvBlur • Palette:imageSearch • Palette:julia • Palette:kantanMapper • Palette:kinectCalibration • Palette:kinectPointcloud • Palette:leapPaint • Palette:lightTunnel • Palette:logger • Palette:mandelbrot • Palette:materialDesignIcons • Palette:mesh • Palette:monochrome • Palette:motionSense • Palette:movieEngine • Palette:moviePlayer • Palette:moviePlaylist • Palette:multiLevel • Palette:multiMix • Palette:noise • Palette:onScreenKeyboard • Palette:operatorPath • Palette:opticalFlow • Palette:pixelate • Palette:pixelRelocator • Palette:pointGenerator • Palette:pointillize • Palette:pointMerge • Palette:pointRender • Palette:pointRepack • Palette:pointTransform • Palette:pointWeight • Palette:popDialog • Palette:probe • Palette:projectorBlend • Palette:pushPins • Palette:puzzle • Palette:quadReproject • Palette:radialBlur • Palette:recorder • Palette:remotePanel • Palette:rgbaBlur • Palette:rgbaDelay • Palette:rgbContrast • Palette:sceneChanger • Palette:search • Palette:searchReplace • Palette:sharpen • Palette:sickEngine • Palette:signalingClient • Palette:signalingServer • Palette:softenAlpha • Palette:solarize • Palette:sopRender • Palette:splitter • Palette:stitcher • Palette:stoner • Palette:superFormula • Palette:SVG • Palette:sweetSpot • Palette:sweetSpotPreviz • Palette:synchroCache • Palette:synchroClient • Palette:synchroFrameIn • Palette:synchroFrameOut • Palette:synchroNDIIn • Palette:synchroSDIIn • Palette:synchroVideoOut • Palette:tdBitwigPackage • Palette:TDVR • Palette:transitMap • Palette:twirl • Palette:vectorScope • Palette:virtualFile • Palette:waveformMonitor • Palette:webBrowser • Palette:webRTC • Palette:webRTCPanel • Palette:webRTCPanelRcv • Palette:xyScope