The __Firmata__ library implements the  [Firmata protocol|https://github.com/firmata/protocol] (a Midi-like communications protocol) for communicating with software on the host computer. This allows you to write custom firmware without having to create your own protocol and objects for the programming environment that you are using.
 
To use this library use this in your Arduino sketch:
{{{
#include <Firmata.h>
}}}

* [Firmata home page|https://www.arduino.cc/en/reference/firmata]
* [The Firmata Protocol|https://github.com/firmata/protocol] (not a [Tom Cruise movie|https://en.wikipedia.org/wiki/Mission:_Impossible_%E2%80%93_Ghost_Protocol], nor a book by [Frederick_Forsyth|https://en.wikipedia.org/wiki/The_Fourth_Protocol], [Robert Ludlum|https://en.wikipedia.org/wiki/The_Sigma_Protocol], or a [film with Patricia Arquette|https://en.wikipedia.org/wiki/Stigmata_(film)])

See also: [PyMata Express On Arduino|PyMataExpressOnArduino] (an experiment)


----

[{TableOfContents}]

!! Summary

Based on a cursory look at what's available (summarised below), depending on whether or not one wants async IO or not it seems that either __PyMata4__ or __PyMata Express__ is the best candidate. One would be communicating in either __[StandardaFirmata|https://github.com/firmata/arduino/blob/master/examples/StandardFirmata/StandardFirmata.ino]__ or __[FirmataExpress|https://github.com/MrYsLab/FirmataExpress]__ (AIO).  

FirmataExpress adds support for:

* HC-SR04 Ultrasonic Distance Sensors using a single pin
* Stepper Motors
* Piezo Tone Generation
* Baud rate of 115200

but apparently has a significantly higher learning curve than StandardFirmata.

There are implementations of Firmata in most programming and scripting languages.
Below are listed some of the known Python implementations (since that's what we're
using for the [KR01] robot).

!! Firmata Protocol

* [Firmata home page|https://github.com/firmata/arduino] on github

Includes a list of known implementations in many languages.

 
! Pymata Express

* [Home page|https://github.com/MrYsLab/pymata-express] 

This is an asynchronous IO version of __PyMata4__. 

The [User Guide|https://mryslab.github.io/pymata-express/] has a section on why one would choose Express over PyMata.


! PyMata 4

* [Home page|https://github.com/MrYsLab/pymata4] 

A current project; dozens of examples; good documentation, including user guide.

Supports both an enhanced version of StandardaFirmata 2.5.8, called __FirmataExpress__, as 
well as __StandardFirmata__.
        

! PyFirmata
 
* [Home page|https://github.com/tino/pyFirmata] 

Compliant with Firmata 2.1; reasonably good documentation; latest commit 2019.

----

!! Outdated or Superceded Python Implementations

! PyMata-AIO

* [Home page|https://github.com/MrYsLab/pymata-aio] 

The project is current archived, replaced by __Pymata Express__.


! PyMata

* [Home page|https://github.com/MrYsLab/PyMata] 

The project is current but archived, replaced by __PyMata 4__.


! Python Firmata

* [Home page|https://github.com/lupeke/python-firmata] 

A dead project; relatively complete implementation, two trivial examples; latest commit 2010.


! Pyduino

* [Home page|https://github.com/firmata/pyduino] 

A dead project; only two files; latest commit 2009.


!! References

* [Firmata Library Reference|https://www.arduino.cc/en/reference/firmata]
* [PyMata Express|https://github.com/MrYsLab/pymata-express] on github
* [PyMata Express User Guide|https://mryslab.github.io/pymata-express/]
* [Firmata/Arduino|https://github.com/firmata/arduino] on github

----

[{Tag Arduino}]