Socket
Socket
Sign inDemoInstall

chip-io

Package Overview
Dependencies
23
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    chip-io

Johnny-Five IO Plugin for the Next Thing Co. C.H.I.P.


Version published
Weekly downloads
10
increased by400%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

Version 2.1.1

  • Added new on-board button and status LED example. (@norgeous)
  • Switch to i2c-bus module for I2C layer. (@fivdi)
  • Throw exception for pingRead.

Readme

Source

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

Keywords

FAQs

Last updated on 25 Jan 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc