ODROID-IO
ODROID-IO is a Johnny-Five I/O Plugin for Odroid C2 IO Plugin for Johnny-Five. It extends board-io to provide Linux implementations for the following features that IO Plugins can support:
- Digital IO
- Implementation based on the GPIO sysfs interface using onoff
- I2C
- Implementation based on the /dev interface using i2c-bus
Installation
npm install odroid-io
Johnny-Five Features Supported
The Johnny-Five features supported by a platform are summarized in tables on the Platform Support page. The features supported by Linux-IO shown in the following table:
Feature | Support |
---|---|
Analog Read | yes |
Digital Read | yes |
Digital Write | yes |
PWM | no |
Servo | no |
I2C | yes |
One Wire | no |
Stepper | no |
Serial/UART | no |
DAC | no |
Ping | no |
Usage
Here's a minimalistic IO Plugin for the Raspberry Pi called TinyRaspberryPiIO that allows digital IO on GPIO4 and GPIO17 and I2C serial bus access on I2C bus 1. The built-in LED can also be used.
'use strict'; var five = ;var OdroidIO = ; var board = io: ; board;
If an ADXL345 accelerometer is connected to I2C bus 1, the following program will print information provided by accelerometer.
var five = ;var OdroidIO = ; var board = io: ; board;