Last active
December 16, 2015 15:09
-
-
Save tadfmac/926084f9fa54e691de6d to your computer and use it in GitHub Desktop.
blink for CHIRIMEN
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 pnums = [199,244,243,246,245]; | |
for(var i= 0;i< pnums.length; i++){ | |
navigator.mozGpio.export(pnums[i]); | |
var start = new Date(); | |
while((new Date()-start)<100); | |
} | |
var val,c = 0; | |
setInterval(function(){ | |
val ^= 1; | |
navigator.mozGpio.setValue(pnums[c],val); | |
if(val == 0){ | |
c=(c+1)%pnums.length; | |
} | |
},100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
movie