The Firmata library implements the 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>
See also: PyMata Express On Arduino (an experiment)
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 or FirmataExpress (AIO).
FirmataExpress adds support for:
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).
Includes a list of known implementations in many languages.
This is an asynchronous IO version of PyMata4.
The User Guide has a section on why one would choose Express over PyMata.
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.
Compliant with Firmata 2.1; reasonably good documentation; latest commit 2019.
The project is current archived, replaced by Pymata Express.
The project is current but archived, replaced by PyMata 4.
A dead project; relatively complete implementation, two trivial examples; latest commit 2010.
A dead project; only two files; latest commit 2009.