Skip to content

Firmata Device Proposals

soundanalogous edited this page Dec 15, 2014 · 31 revisions

There is a growing interest in adding device support to the Firmata protocol. These are specific devices or breakout boards such as a specific sensor or driver or other device that does not use a standard protocol like SPI or I2C or that would otherwise has specific timing requirements that Firmata cannot currently handle - at least not over a 57600 baud serial connection.

Some challenges in supporting specific devices/breakout boards, etc in Firmata is managing the command bytes (the 2nd byte in a sysex message) and where to host the device-specific code and how to manage any 3rd party dependencies.

The first step is generating a list of devices/breakout boards etc that people would like to see added to Firmata. For each device please fill out the device template below to the best of your ability.

Proposals:

Device Template (Do not delete. Copy this for your device proposal)

  • Name of device/breakout board and add a link
  • Link to datasheet
  • Number of pins it requires
  • Any other information that may be helpful in evaluating this device
  • If the device uses I2C, explain why it needs a separate interface to Firmata (some I2C devices have weird exceptions in the protocol so this could be the case).

If the device/breakout board has an associated 3rd party library (such as an Adafruit library) that would be wrapped to provide a Firmata interface please also provide the following information. If you will be writing a new library, please also specify the following where appropriate:

  • A link to the library code
  • Platforms supported by the library (Arduino as well as non-arduino platforms since Firmata is not restricted to Arduino)
  • Boards supported by the library (per platform - could also just list architectures supported such as ATMega, SAM, etc instead of listing every single variant)
  • Is the library actively maintained?
  • Interrupts and Timers it used (if none, state "No timers or interrupts are used")
  • Required delays in the code (if none or if delays are only a few microseconds, state "No delays")
  • Does the library dynamically allocate memory, if so how much memory is allocated?

LED strip (WS2812, WS2811 and WS2801)

3rd party library

  • Adafruit NeoPixel library
  • Platforms: Arduino
  • Boards: ATMega, Teensy 3.0 & 3.1, ATTiny 85, Arduino Due
  • Uses dynamic memory allocation (1 byte / pixel)
  • Does not use interrupts, but disables interrupts globally during the show call.
  • Required delays TBD (need to review the code in more depth)

DHT11, DHT21/DHT22 Temp & Humidity sensor

3rd party library

  • Adafruit DHT sensor library
  • Platforms: Arduino
  • Boards: Assuming anything that can be compiled in the Arduino IDE
  • Also supports DHT21 & DHT22
  • Does not use interrupts, but disables interrupts globally during read cycle.
  • Read cycle requires approximately 250 milliseconds in delay calls

Note this library is different than the one in the configurable firmata example DHT11. This library is more up to date and likely better maintained. It also uses less delays.