Created
July 24, 2019 22:35
-
-
Save futureshocked/21c2ab36280ee151bca4a6ba75b1beb7 to your computer and use it in GitHub Desktop.
an exit button that opens a door
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 interfaces | |
| #define LED_PIN 26 // —>|–[R]—3v3 | |
| #define RELAY_PIN 33 | |
| #define BUTTON_PIN 25 // —./.—-0V | |
| // Define Timings | |
| #define LED_ACTIVE_ON 0.2 // Flashing when relay output is active | |
| #define LED_ACTIVE_OFF 0.2 // Time in seconds | |
| #define LED_IDLE_ON 12 // On with short turn off when idle | |
| #define LED_IDLE_OFF 0.5 | |
| #define RELAY_INTERVAL 6 // duration relay operates in seconds | |
| #define DEBOUNCE 0.025 // wait 25 ms to check if button really pressed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment