Nodebots – JavaScript Powered Arduino with Johnny-Five – Arduino Components



Nodebots – JavaScript Powered Arduino with Johnny-Five – Arduino Components

0 0


nodebots-for-fullstackers


On Github jeesunikim / nodebots-for-fullstackers

Nodebots

JavaScript Powered Arduino with Johnny-Five

Created by Jeesun Kim / @jeesunikim

Arduino History

An open-source computer hardware and software company Started in 2005 as a project for students at the Interaction Design institute Ivrea in Italy

Arduino Components

Arduino Uno Breadboard LED Resistor Switch Wiresand more...

Start Coding

Arduino programs are written in C or C++. The necessary functions are: setup() and loop()

int switchState = 0; 
    // from C++. Int means integer
void setup() {
    // runs once, when the Arduino is powered on
}
void loop() {
    // runs continuously after the setup() has completed
}

Nodebots aka Johnny-Five

The JavaScript Robotics and Hardware Programming Framework.

Rick Waldron's Johnny-Five

No more C language..?

To Use Johnny-Five

The StandardFirmata Sketch needs to run in Arduino IDE.

Install Johnny-Five using node

npm install johnny-five

Basic Johnny-Five Intro Code

var j5 = require("johnny-five");
var board = new j5.Board();
var LEDPIN = 8;
var BTNPIN = 7;
var ledOn = false;

board.on("ready", function(){
  var led = new j5.Led(LEDPIN);
  var btn = new j5.Button(BTNPIN);

  btn.on("hit", function(){
    led.on();
  });  

  btn.on("release", function(){
    led.off();
  });
});

Will Nodebots replace Arduino's C language?

Probably not

Cool Arduino Projects

LED Cube 8x8x8Robot

Resources

Awesome Johnny-Five Intro BlogJohnny-Five npm library

Nodebots JavaScript Powered Arduino with Johnny-Five Created by Jeesun Kim / @jeesunikim