2.1.1 • Published 9 years ago

chip-io v2.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

chip-io

logo

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
    1. Install curl: sudo apt-get install curl
    2. 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

NOTE: Some GPIO pins require root or sudo.

Getting Started

npm install chip-io johnny-five

NOTE: Must be run on the C.H.I.P. itself.

Boilerplate Program

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
});

Examples

See examples folder as well as Johnny-Five examples.

API

See Johnny-Five API docs.

Pin Guide

Johnny-Five Compatible NameNumberSupported ModesRequires root or sudoInfo
LCD-D217Input
PWM018Input, Output, PWM
LCD-D419Input, Output
LCD-D320Input, Output
LCD-D621Input, Output
LCD-D522Input, Output
LCD-D1023Input, Output
LCD-D724Input, Output
LCD-D1225Input, Output
LCD-D1126Input, Output
LCD-D1427Input, Output
LCD-D1328Input, Output
LCD-D1829Input, Output
LCD-D1530Input, Output
LCD-D2031Input, Output
LCD-D1932Input, Output
LCD-D2233Input, Output
LCD-D2134Input, Output
LCD-CLK35Input, Output
LCD-D2336Input, Output
LCD-VSYNC37Input, Output
LCD-HSYNC38Input, Output
LCD-DE40Input, Output
LRADC51Analog
XIO-P053Input, OutputConnected to the built-in PCF8574A IO extender
XIO-P154Input, OutputConnected to the built-in PCF8574A IO extender
XIO-P255Input, OutputConnected to the built-in PCF8574A IO extender
XIO-P356Input, OutputConnected to the built-in PCF8574A IO extender
XIO-P457Input, OutputConnected to the built-in PCF8574A IO extender
XIO-P558Input, OutputConnected to the built-in PCF8574A IO extender
XIO-P659Input, OutputConnected to the built-in PCF8574A IO extender
XIO-P760Input, OutputConnected to the built-in PCF8574A IO extender
CSIPCK67Input
CSICK68Input
CSIHSYNC69Input
CSIVSYNC70Input, Output
CSID071Input, Output
CSID172Input, Output
CSID273Input, Output
CSID374Input, Output
CSID475Input, Output
CSID576Input, Output
CSID677Input, Output
CSID778Input, Output
I2CI2CUses I2C port 2 (TWI2-SCK and TWI2-SDA). Address 0x38 is used by the built-in PCF8574A IO extender

C.H.I.P. pinouts

Additional Features

TypeUsageJohnny-Five typeNotes
Battery Voltagenew chipio.BatteryVoltage();five.SensorReads battery voltage from the AXP290
Internal Temperaturenew chipio.InternalTemperature();five.ThermometerReads internal temperature from the AXP290
Onboard Buttonnew chipio.OnboardButton();five.ButtonUse onboard button (beside LCD-DE pin) connected to the AXP290
Status LEDnew chipio.StatusLed;five.LedControls status LED connected to GPIO2 on the AXP290
2.1.1

9 years ago

2.1.0

9 years ago

2.0.2

9 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.0

10 years ago