Skip to content

NoGRo/pcduino-io

This branch is 6 commits behind rwaldron/pcduino-io:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 23, 2015
76fe2fb · Mar 23, 2015

History

5 Commits
Mar 23, 2015
Mar 23, 2015
Mar 23, 2015
Mar 23, 2015
Mar 23, 2015
Mar 23, 2015
Mar 23, 2015
Mar 23, 2015
Mar 23, 2015

Repository files navigation

pcDuino-IO

Build Status

pcDuino-IO is compatible with pcDuino3.

pcDuino-IO is a Firmata.js-compatibility class for writing Node.js programs that run on the pcDuino3. This project was built at Bocoup

Getting Started

pcDuino-IO scripts are run directly from the pcDuino3 (or similar in family) board. Assuming your pcDuino has already been setup for networking, getting started is easy:

Install a compatible version of node/npm

wget http://nodejs.org/dist/v0.10.24/node-v0.10.24-linux-arm-pi.tar.gz
tar xvzf node-v0.10.24-linux-arm-pi.tar.gz
cd node-v0.10.24-linux-arm-pi
sudo cp -R * /usr/local

Create a directory for your project, cd into the directory and run the following:

npm init; # follow the prompts
npm install johnny-five pcduino-io --save

Hello World!

var pcDuino = require("pcduino-io");
var board = new pcDuino();

board.on("ready", function() {
  this.pinMode(13, this.MODES.OUTPUT);
  setInterval(function() {
    this.digitalWrite(13, (state ^= 1));
  }.bind(this), 500);
});

...With Johnny-Five

var five = require("johnny-five");
var pcDuino = require("pcduino-io");
var board = new five.Board({
  io: new pcDuino()
});

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

See Johnny-Five's examples for usage.

License

See LICENSE file.

About

pcDuino IO Plugin for Johnny-Five

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%