Skip to content

Instantly share code, notes, and snippets.

@anthonywebb
Created July 20, 2013 20:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anthonywebb/6046278 to your computer and use it in GitHub Desktop.
var b = require('bonescript');
var state = b.LOW;
b.pinMode("P9_15", b.OUTPUT);
b.pinMode("P9_17", b.OUTPUT);
setInterval(toggle, 1000);
function toggle() {
if(state == b.LOW) state = b.HIGH;
else state = b.LOW;
b.digitalWrite("P9_15", state);
b.digitalWrite("P9_17", state);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment