Skip to content

Commit

Permalink
Merge pull request #398 from tessel/kb-blink
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyman727 committed Oct 26, 2015
2 parents a0b5091 + 9d74d4c commit bef4b6e
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions resources/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
// Import the interface to Tessel hardware
var tessel = require('tessel');

// Set the led pins as outputs
var led1 = tessel.led[2];
var led2 = tessel.led[3];

// Set initial LED states
led1.output(1);
led2.output(0);
// Turn one of the LEDs on to start.
tessel.led[2].on();

// Blink!
setInterval(function () {
console.log("I'm blinking! (Press CTRL + C to stop)");
// Toggle the led states
led1.toggle();
led2.toggle();
console.log("I'm blinking! (Press CTRL + C to stop)");
tessel.led[2].toggle();
tessel.led[3].toggle();
}, 100);

0 comments on commit bef4b6e

Please sign in to comment.