Download esp32/level1/bar_led_basic/src/main_esp.cpp from eunzee/PCEval: direct link, hf CLI and curl.
- Browser
- Download file 402 Bytes
-
https://huggingface.co/datasets/eunzee/PCEval/resolve/main/esp32/level1/bar_led_basic/src/main_esp.cpp
- Command line
-
hf download hf://datasets/eunzee/PCEval/esp32/level1/bar_led_basic/src/main_esp.cpp
-
curl -L -o main_esp.cpp https://huggingface.co/datasets/eunzee/PCEval/resolve/main/esp32/level1/bar_led_basic/src/main_esp.cpp
402 Bytes
| /** | |
| Use bar LED | |
| 10 APR 2025 by Blind Author | |
| */ | |
| int pinList[] = {2, 4, 5, 12, 13, 14, 18, 19, 21, 22}; | |
| int threshold = 6; | |
| void setup() { | |
| for (int i=0; i<10; i++) { | |
| pinMode(pinList[i], OUTPUT); | |
| } | |
| for (int i=0; i<10; i++) { | |
| if (i < threshold) { | |
| digitalWrite(pinList[i], HIGH); | |
| } else { | |
| digitalWrite(pinList[i], LOW); | |
| } | |
| } | |
| } | |
| void loop() { | |
| } |