|
Download esp32/level4/binary_led/description_esp.md from eunzee/PCEval: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/datasets/eunzee/PCEval/resolve/main/esp32/level4/binary_led/description_esp.md
- Command line
-
hf download hf://datasets/eunzee/PCEval/esp32/level4/binary_led/description_esp.md
-
curl -L -o description_esp.md https://huggingface.co/datasets/eunzee/PCEval/resolve/main/esp32/level4/binary_led/description_esp.md
1.1 kB
Binary LED
Project Description
This is an ESP32 project that uses 5 LEDs to display the binary form of a number received over serial.
Hardware Components
- ESP32 DevKit v1
- 220Ω resistor * 5
- LED * 5
Circuit Description
Five LEDs are connected to ESP32. LED 1 to 5 are connected to ESP32 pin2, pin4, pin5, pin12, pin13 through 220Ω resistor, respectively. Cathode pin of each LEDs are connected to gnd2.
Expected Behavior
When the ESP32 powers up, it should:
- Set pin2, pin4, pin5, pin12, pin13 pin mode as OUTPUT
- Continuously read the serial monitor, which ranges from 0 to 31
- With LED1 as the LSB and LED5 as the MSB, light up the LEDs that represent 1s in the binary form of the input number
Success Criteria
The test is successful when:
- When a number is entered via serial input, LEDs corresponding to the bits set to 1 in its binary representation are turned on.
Notes for Implementation
- Use Arduino.h library for arduino core.
- Serial input ranges from 0 to 31.
Attributes
- To use 220Ω resistor, set the property name "value" to "220 ohm".