Johnny Five

January 2015 Jax Node

We've been Forked!

  • Joyent has created an Advisory Board
  • Original commiters forked Node into NodeFoward
  • Name changed to io.js after Joyent threatened Legal action
  • Commiters were disapointed in the number of new releases in 2014

io.js project goals

  • Fix persistent bugs and feature requests 
  • Node compatibility
  • NPM compatible
  • Stable V8 release updates
  • Merge changes back into Node.js

RobotsConf 2014

  • IoT
  • For developers who want to do hardware
  • Lots of new hardware
  • Inventors of this stuff were there

Electric Imp

  • Size of an SD Card
  • Program it with Squirrel, or use Johnny Five
  • Started by former Apple and Google execs

Espruino Pico

  • Runs Javascript
  • Same size as Spark Core
  • Chrome extension for the IDE
  • No builtin Wi-Fi, but you can add a module

Spark Photon

  • Same size as Core, half the price
  • Can use Web IDE or use stand alone
  • New Broadcom Wi-Fi chip
  • More memory

Johnny Five

  • Invented by Rick Waldron
  • Uses Node-Serial from Chris Williams
  • Broad hardware support, including Arduino,
    Spark Core and Electric Imp 

Hardware Support

  • Leds
  • Servos
  • Buttons
  • IMU
  • Motors
  • Steppers
  • Ultrasonic
  • Relays
  • LCDs
  • IR
  • Accelerometer
  • Gyro
  • Temperature
  • Piezo

J5 Example

var five = require("johnny-five"),
    // or "./lib/johnny-five" when running from the source
    board = new five.Board();

board.on("ready", function() {

  // Create an Led on pin 13 and strobe it on/off
  // Optionally set the speed; defaults to 100ms
  (new five.Led(13)).strobe();

});

Led methods

  • led.on()
  • led.off()
  • led.toggle()
  • led.blink(500)
  • led.fade(128, 2000)

Servos

  • Standard Servo
  • Continuous Motion Servo
  • Stepper Motor

Servo methods

  • Standard servos have range of 180
  • servo.sweep()
  • servo.min()
  • servo.max()
  • servo.to(45)
  • server.top(degrees 0-180 [, ms [, rate]) 
  • cm servo servo.cw(1) or ccw(1)

Demo

Questions

How to Contact me

  • David Fekke at gmail dot com
  • Twitter: @davidfekke & @jaxnode
  • Skype: davidfekke