Johnny-Five IO Plugin for the Next Thing Co. C.H.I.P.
- Next Thing Co. C.H.I.P. board
- Node.js installed
- Install
curl
:sudo apt-get install curl
- Follow Debian section of NodeSource installations instructions
- Install
- Build essential installed:
sudo apt-get install build-essential
- Add
chip
user toi2c
group:sudo adduser chip i2c
npm install chip-io johnny-five
var five = require('johnny-five');
var chipio = require('chip-io');
var board = new five.Board({
io: new chipio()
});
board.on('ready', function() {
// do Johnny-Five stuff
});
See examples folder as well as Johnny-Five examples.
See Johnny-Five API docs.
Johnny-Five Compatible Name | Number | Supported Modes | Info |
---|---|---|---|
XIO-PO | 53 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P1 | 54 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P2 | 55 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P3 | 56 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P4 | 57 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P5 | 58 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P6 | 59 | Input, Output | Connected to the PCF8574A IO extender |
XIO-P7 | 60 | Input, Output | Connected to the PCF8574A IO extender |
I2C | I2C | Uses I2C port 1 (TWI1-SCK and TWI1-SDA) |
Type | Usage | Johnny-Five type | Notes |
---|---|---|---|
Battery Voltage | new chipio.BatteryVoltage(); |
five.Sensor | Reads battery voltage from the AXP290 |
Internal Temperature | new chipio.InternalTemperature(); |
five.Thermometer | Reads internal temperature from the AXP290 |
Status LED | new chipio.StatusLed; |
five.Led | Controls status LED connected to GPIO2 on the AXP290 |