O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installing Firmata on your Arduino board

To access analog sensors on a Raspberry Pi, you need to add circuitry supporting serial communication to your board since it's not supported by default. One way is to use I2C or SPI circuits with analog to digital converters. Another way, which we explore in this book, is to use an Arduino board. The Arduino is a programmable chip, and, as such, you can program your own firmware with your own serial protocol inside. A simpler method, is to use the well-used and battle-tested Firmata protocol. Software for this already exists, and is available in the Arduino IDE directly. Libraries for Firmata exist in many languages.

To install Firmata on your Arduino board, simply follow the following procedure:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required