UNPKG

johnny-five-electron

Version:

Temporary fork to support Electron (to be deprecated)

21 lines (18 loc) 638 B
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { var gyro = new five.Gyro({ pins: ["A0", "A1"] }); gyro.on("change", function() { console.log("gyro"); console.log(" x : ", this.x); console.log(" y : ", this.y); console.log(" pitch : ", this.pitch); console.log(" roll : ", this.roll); console.log(" yaw : ", this.yaw); console.log(" rate : ", this.rate); console.log(" isCalibrated : ", this.isCalibrated); console.log("--------------------------------------"); }); });