Button
Python Library for Button.
Turta_Button library is responsible for reading onboard button press state.
Add the following statement to the top of your Python code.
from turta_iothat3 import Turta_Button
Then, create an instance of the ButtonInput class.
button = Turta_Button.ButtonInput()
Now you're ready to access the library by calling its instance.
Reads the button press state.
read()
Parameters
None Returns
Bool: Button press state. (True if pressed, False if not.)
When exiting from the program, the library releases the GPIO pin.
Last modified 3yr ago