Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 1.16 KB

File metadata and controls

29 lines (17 loc) · 1.16 KB

MircoPython - button

Hardware introduction:BPI:bit(ESP32)

Keystroke detection

The purpose is achieved through the Output output and Input input of keys.

Key State Recognition

Button hardware correlation function button modular.Before calling related functions, you need to import the corresponding libraries.

Main functions

  1. 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.

  1. button_a.is_pressed():

Used to determine whether key A is pressed or not.


button Example