Created
March 24, 2026 18:41
-
-
Save indefinit/c1b86ab07b501abd79d231540f000b3c to your computer and use it in GitHub Desktop.
Arduino triggering an event
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
| unsigned long lastTime = 0; | |
| void loop() { | |
| if (millis() - lastTime > 1000) { | |
| Serial.println("One second has passed!"); | |
| lastTime = millis(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment