This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var line = require('lightning-line') | |
var el = document.body.appendChild(document.createElement('div')) | |
var i = 0 | |
var xCoords = new Array(100).fill(0); | |
var yCoords = new Array(100).fill(0); | |
var interval = 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var five = require("johnny-five"), | |
board = new five.Board(); | |
board.on("ready", function() { | |
console.log('Board ready') | |
var led = new five.Led(12); | |
led.on() | |
}); | |
board.on("close", function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Hello Pi') | |
var raspi = require('raspi-io') | |
var five = require('johnny-five') | |
var board = new five.Board({ | |
io: new raspi() | |
}) | |
board.on('ready', function() { | |
console.log('Board ready') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Board = require('firmata') | |
var board = new Board('/dev/cu.usbmodem1411') | |
board.on('ready', function() { | |
console.log('Board ready') | |
board.pinMode(12, board.MODES.OUTPUT) | |
board.pinMode(9, board.MODES.INPUT) | |
var state = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var raspi = require('raspi-io') | |
var five = require('johnny-five') | |
var board = new five.Board({ | |
io: new raspi() | |
}) | |
board.on('ready', function() { | |
var led = new five.Led(0) | |
var spdt = new five.Switch(2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Hello Pi') | |
var raspi = require('raspi') | |
var gpio = require('raspi-gpio') | |
raspi.init(function() { | |
console.log('Board-ready') | |
var input = new gpio.DigitalInput(2) | |
var output = new gpio.DigitalOutput(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Hello Pi') | |
var raspi = require('raspi') | |
var gpio = require('raspi-gpio') | |
var NanoTimer = require('nanotimer') | |
var timer = new NanoTimer() | |
raspi.init(function() { | |
console.log('Board-ready') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Hello Pi') | |
var raspi = require('raspi') | |
var gpio = require('raspi-gpio') | |
var NanoTimer = require('nanotimer') | |
var fs = require('fs') | |
var now = require('performance-now') | |
var path = require('path') | |
var timer = new NanoTimer() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Mouse = require('node-mouse') | |
var m0 = new Mouse(0) | |
m0.on('mousemove', function (event) { | |
console.log('Mouse 0: [' + event.xDelta + ', ' + event.yDelta + ']') | |
}) | |
var m1 = new Mouse(1) | |
m1.on('mousemove', function (event) { | |
console.log('Mouse 1: [' + event.xDelta + ', ' + event.yDelta + ']') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var now = require('performance-now') | |
//Require LabJack-nodejs | |
var ljn = require('labjack-nodejs'); | |
//Device object (to control a LabJack device)c | |
var createDeviceObject = ljn.getDevice(); | |
//Device object (to control a LabJack device) | |
var device = new createDeviceObject(); |
OlderNewer