Skip to content

Instantly share code, notes, and snippets.

@gyengus
Last active August 29, 2015 14:23
Show Gist options
  • Save gyengus/1d3dbb929d62766887bb to your computer and use it in GitHub Desktop.
Save gyengus/1d3dbb929d62766887bb to your computer and use it in GitHub Desktop.
espruino_pico_demo
var l = false;
setInterval(function() {
l = !l;
LED1.write(l);
LED2.write(!l);
}, 500);
function readBTN() {
if (digitalRead(BTN1) == 1) {
console.log('Button keydown');
} else {
console.log('Button keyup');
}
}
setWatch(readBTN, BTN1, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment