Socket
Book a DemoInstallSign in
Socket

pinoccio-io

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pinoccio-io

johnny five io plugin for pinoccio boards! https://pinocc.io

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

pinoccio-io

johnny five io plugin for pinoccio!

Build Status

thanks to @rwaldron for johnny-five and io plugins which served as example.

to find out about https://pinocc.io

The "Hello World" of microcontroller programming:

var Pinoccio = require("pinoccio-io");
var board = new Pinoccio({
  token: "{{yours}}",
  troop: "{{yours}}",
  scout: "{{yours}}"
});

board.on("ready", function() {
  console.log("CONNECTED");
  this.pinMode("D5", this.MODES.OUTPUT);

  var byte = 0;

  setInterval(function() {
    console.log("message");
    this.digitalWrite("D5", (byte ^= 1));
  }.bind(this), 500);
});

Johnny-Five IO Plugin

pinoccio-io can be used as an IO Plugin for Johnny-Five:

var five = require("johnny-five");
var Pinoccio = require("pinoccio-io");
var board = new five.Board({
  io: new Pinoccio({
    token: "{{yours}}",
    troop: "{{yours}}",
    scout: "{{yours}}"   
  })
});

board.on("ready", function() {
  var led = new five.Led("D5");
  led.blink(500);
});

API

todo. =)

  • pinMode
  • digitalWrite
  • analogWrite
  • digitalRead
  • analogRead
  • setSamplingInterval

FAQs

Package last updated on 11 Jun 2014

Did you know?

Socket

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