Created
June 5, 2017 19:03
-
-
Save maxpromer/7faacd985ae416f0d4a3f0ecaba5d77d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #define LED1 LED_BUILTIN | |
| #define LED2 23 | |
| unsigned long last1, last2; | |
| void setup() { | |
| pinMode(LED1, OUTPUT); | |
| pinMode(LED2, OUTPUT); | |
| } | |
| void loop() { | |
| if (millis() - last1 >= 500) { | |
| last1 = millis(); | |
| digitalWrite(LED1, !digitalRead(LED1)); | |
| } | |
| if (millis() - last2 >= 300) { | |
| last2 = millis(); | |
| digitalWrite(LED2, !digitalRead(LED2)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment