Last active
August 29, 2015 14:23
-
-
Save gyengus/1d3dbb929d62766887bb to your computer and use it in GitHub Desktop.
espruino_pico_demo
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
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