-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #398 from tessel/kb-blink
fixes tessel/t2-start#53
- Loading branch information
Showing
1 changed file
with
6 additions
and
11 deletions.
There are no files selected for viewing
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
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); |