Download esp32/level2/button_pulldown/src/main_esp.cpp from eunzee/PCEval: direct link, hf CLI and curl.
- Browser
- Download file 401 Bytes
-
https://huggingface.co/datasets/eunzee/PCEval/resolve/main/esp32/level2/button_pulldown/src/main_esp.cpp
- Command line
-
hf download hf://datasets/eunzee/PCEval/esp32/level2/button_pulldown/src/main_esp.cpp
-
curl -L -o main_esp.cpp https://huggingface.co/datasets/eunzee/PCEval/resolve/main/esp32/level2/button_pulldown/src/main_esp.cpp
401 Bytes
| /** | |
| Manage pull down registor button input | |
| 1 APR 2025 by Blind Author | |
| */ | |
| const int inputPin = 4; | |
| void setup() | |
| { | |
| Serial.begin(9600); | |
| pinMode(inputPin, INPUT); | |
| } | |
| void loop() | |
| { | |
| int val = digitalRead(inputPin); | |
| if (val == HIGH) { | |
| Serial.println("Button pressed"); | |
| } else | |
| { | |
| Serial.println("Button not pressed"); | |
| } | |
| delay(1000); | |
| } |