Arduino is an open-source electronics prototyping platform. An Arduino board is development hardware consisting of a programmable microcontroller. The boards can collect information(inputs), act on the inputs(processing) and finally produce outputs. Typically, Arduino boards are programmed using the Arduino programming language through the Arduino IDE using custom firmware(sketches). Arduino exists in many forms and flavours, from the official boards such as the UNO, ArduinoBoard 101 and MEGA, to Arduino-compatible ones like the NodeMCU.
Arduino boards are usually based on microcontrollers with low CPU clock speed (around 16 to 32 MHz) and limited memory space. The Firmata protocol provides a way to harness the power of a more powerful machine to run complex processing while using the arduino being used to collect data from sensors and execute desired outputs.
Firmata is a protocol allowing communication between software and microcontrollers. It thus provides a common language with which both the software and hardware can communicate. It works as a host-client method where the microcontroller acts as the client and a more powerful device (smartphone, tablet or computer) acts as the host communicating through a channel such as WiFi, Bluetooth or USB connection. Basically, Firmata makes the board Input/Output pins available via serial communication.
The protocol has two implementations : Firmware and Client Libraries. The firmware runs on the development board and establishes a method for communication with software running on a host machine. The Arduino IDE provides a Firmata library, implementing the Firmata protocol.
The client hardware can be connected to the host machine either physically (through a cable) or wirelessly. There Arduino IDE provides different implementations of the firmware taking into consideration the different means of communication such as Serial, Ethernet, WiFi and Bluetooth.
Download and install the Arduino IDE.
Arduino provides Firmata as sketches. The StandardFirmata sketch is the most widely used. It allows communication via a serial port such as USB. To flash it, naviagte to File –> Examples –> Firmata –> Standard Firmata. Choose the appropriate options for your board in the Tools section and finally upload the sketch to the arduino board.
Firmata provides a test program for boards running StandardFirmata. It allows quick testing of all I/O pins. It runs without installation and works on Windows, MacOs, and Linux. The binaries can be found here.
It is similar to the Firmata Test program, however it is available as a chrome extension. It has a RECORDER feature that enables the recording and the replay of the actions done with the interface and an OSCILLOSCOPE feature which allows to observe voltage changes on one of the analog input.
Once the board running Firmata firmware has been tested, software can be implemented in different programming languages. There are different client libraries.