UNPKG

node-ardx

Version:

Exercises for exploring the Arduino Experimenter's kit using johnny-five

11 lines (8 loc) 261 B
var five = require("johnny-five"); five.Board().on("ready", function(){ var tempSensor = new five.Sensor("A0"); tempSensor.on("data", function(err, value){ var cel = (100 * (value / 1000) - 50).toFixed(2); console.log("temp is " + cel); }); });