PCEval / esp32 /level2 /button_pulldown /description_esp.md
eunzee's picture
upload Arduino Uno and ESP32 project files
8e53a3e verified
|
Raw History Blame Contribute Delete
1.35 kB
# Button Pulldown
## Project Description
This is a simple ESP32 project that prints whether the button is pressed.
## Hardware Components
- ESP32 DevKit v1
- 10kΩ resistor
- Push Button
## Circuit Description
Circuit is designed to use a pull-down resistor. When the button is not pressed, the pin4 pin is connected to gnd2 through a 10kΩ resistor. When the button is pressed, the pin4 pin is connected to 3V3.
## Expected Behavior
When the ESP32 powers up, it should:
1. Initialize serial communication
2. Configure the specified button pin as INPUT
3. Continuously check the button value, and print "Button pressed" if the value is HIGH, or print "Button not pressed" if the value is LOW.
## Success Criteria
The test is successful when:
1. "Button pressed" is printed when the button is pressed
2. "Button not pressed" is printed when the button is not pressed
## Notes for Implementation
- Use Arduino.h library for arduino core.
- The pin number used should match the circuit diagram
- When the button is not pressed, pin1.l is connected to pin1.r and pin2.l is connected to pin2.r. When the button is pressed, all the pins are connected together.
## Variants
This project may have different variants with the pushbutton connected to different pins.
## Attributes
- To use 10kΩ resistor, set the property name "value" to "10000 ohm".