Hardware introduction:BPI:bit(ESP32)
The purpose is achieved through the Output output and Input input of keys.
Button hardware correlation function button modular.Before calling related functions, you need to import the corresponding libraries.
button_a.get_presses():
For example: display.scroll(str(button_a.get_presses())) Gets the number of times the key A is pressed and passes it to display.sroll.
button_a.is_pressed():
Used to determine whether key A is pressed or not.
- button_a.py - Judge key A press next number
- smile_button.py - Determine whether key A is pressed to display the image
