Overview of Firmata implementation in Moddable SDK
publicThe Moddable SDK provides an implementation of the Firmata protocol, which allows for hardware control communication between two devices (typically a computer acting as a client and a microcontroller acting as a server).
This implementation is built using the proposed Ecma TC53 IO classes, providing a consistent API for hardware resources like digital/analog IO, I2C, and serial ports.
Key Constraints & Characteristics:
- Target Hardware: The IO Class implementation is currently available only for the ESP8266 microcontroller.
- Protocol Nature: Firmata is a client/server protocol. The microcontroller acts as the server, and the controller (e.g., a computer running
Firmata.js) acts as the client. - Transport: While often used over Serial (default baud rate 57600), it can be carried over any bi-directional connection, such as TCP.
- Assumptions: The protocol assumes a reliable transport (no built-in checksums/retransmits), near real-time connection (no timestamps), and a single client connection (no resource locking mechanism).