chip-io
Johnny-Five IO Plugin for the Next Thing Co. C.H.I.P.
Prerequisites
- Next Thing Co. C.H.I.P. board
- Node.js installed
- Install
curl
: apt-get install curl
- Follow Debian section of NodeSource installations instructions
- Build essential installed:
apt-get install build-essential
Getting Started
npm install chip-io johnny-five
Boilerplate Program
var five = require('johnny-five');
var ChipIO = require('chip-io');
var board = new five.Board({
io: new ChipIO()
});
board.on('ready', function() {
});
Examples
See examples folder as well as Johnny-Five examples.
API
See Johnny-Five API docs.
Pin Guide
Johnny-Five Compatible Name | Number | Supported Modes | Info |
---|
XIO-PO | 0 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P1 | 1 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P2 | 2 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P3 | 3 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P4 | 4 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P5 | 5 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P6 | 6 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P7 | 7 | Input, Output | Connected to the PCF8574A IO extender |
STATUS | 8 | Output | Connected to status LED via GPIO2 of the AXP290 |
BAT | 9 | Input | Reads battery voltage from the AXP290 |
INTTEMP | 10 | Input | Reads internal temperature from the AXP290 |
I2C | | I2C | Uses I2C port 1 (TWI1-SCK and TWI1-SDA) |