Button

Python Library for Button.

Python Library

Turta_Button library is responsible for reading onboard button press state.

Initialization

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.

Basic Members

Read Button State

Reads the button press state.

read()
  • Parameters

    • None

  • Returns

    • Bool: Button press state. (True if pressed, False if not.)

Finalizer

When exiting from the program, the library releases the GPIO pin.

Last updated