File size: 1,095 Bytes
8e53a3e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # 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". |