Created
December 3, 2016 10:11
-
-
Save chris-gunawardena/c412cd80fa26fcf45aabccfc00e1e529 to your computer and use it in GitHub Desktop.
This file contains 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 Chip_io = require('chip-io'); | |
var chip_io = new Chip_io(); | |
var pin = 'CSID0'; | |
//var pin = 'XIO-P0'; | |
chip_io.on('ready', function() { | |
console.log('chip on ready'); | |
chip_io.pinMode(pin, chip_io.MODES.OUTPUT); | |
var start_time = new Date().getTime(); | |
for(var i=0; i<1000; i++) { | |
chip_io.digitalWrite(pin, chip_io.HIGH); | |
} | |
var end_time = new Date().getTime(); | |
console.log(end_time - start_time); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment