Created
June 1, 2011 03:07
-
-
Save hgdeoro/1001721 to your computer and use it in GitHub Desktop.
Examples used on video of web interface (PyArduinoProxy)
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
/* | |
* FIRST EXAMPLE | |
*/ | |
var i; | |
for(i=2; i<=5; i++) { | |
proxy.pinMode(i, OUTPUT); | |
} | |
var j; | |
for(i=0; i<5; i++) { | |
for(j=2; j<=5; j++) { | |
proxy.digitalWrite(j, HIGH); | |
} | |
proxy.delay(200); | |
for(j=2; j<=5; j++) { | |
proxy.digitalWrite(j, LOW); | |
} | |
proxy.delay(200); | |
} | |
/* | |
* SECOND EXAMPLE | |
*/ | |
var i; | |
for(i=2; i<=5; i++) { | |
proxy.pinMode(i, OUTPUT); | |
} | |
var j; | |
for(i=0; i<5; i++) { | |
for(j=2; j<=5; j++) { | |
proxy.digitalWrite(j, HIGH); | |
} | |
for(j=2; j<=5; j++) { | |
proxy.digitalWrite(j, LOW); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment