Skip to content

Instantly share code, notes, and snippets.

@kublaj
Forked from gyengus/espruino_pico_demo.js
Last active August 29, 2015 14:28
Show Gist options
  • Save kublaj/d373d52beac498659b0c to your computer and use it in GitHub Desktop.
Save kublaj/d373d52beac498659b0c 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