PCEval / esp32 /level4 /binary_led /description_esp.md
eunzee's picture
upload Arduino Uno and ESP32 project files
8e53a3e verified
|
Raw History Blame Contribute Delete
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:
1. Set pin2, pin4, pin5, pin12, pin13 pin mode as OUTPUT
3. Continuously read the serial monitor, which ranges from 0 to 31
4. 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:
1. 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".