Skip to content

Instantly share code, notes, and snippets.

@chris-gunawardena
Created December 3, 2016 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris-gunawardena/c412cd80fa26fcf45aabccfc00e1e529 to your computer and use it in GitHub Desktop.
Save chris-gunawardena/c412cd80fa26fcf45aabccfc00e1e529 to your computer and use it in GitHub Desktop.
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