chip-io
![logo](https://github.com/sandeepmistry/node-chip-io/raw/HEAD/images/CHIP-J5.png)
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
: sudo apt-get install curl
- Follow Debian section of NodeSource installations instructions
- Build essential installed:
sudo apt-get install build-essential
- Add
chip
user to i2c
group: sudo adduser chip i2c
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 | 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 |
STATUS | 81 | Output | Connected to status LED via GPIO2 of the AXP290 |
BAT | 82 | Analog | Reads battery voltage from the AXP290 |
INTTEMP | 83 | Analog | Reads internal temperature from the AXP290 |
I2C | | I2C | Uses I2C port 1 (TWI1-SCK and TWI1-SDA) |
![C.H.I.P. pinouts](http://docs.getchip.com/images/chip_pinouts.jpg)