Tinybit MicroPython API
www.yahboom.com
ghandle.B1_is_pressed()
Function: Key B1 (red), press to return to True, release to return to False
ghandle.B2_is_pressed()
Function: Key B2 (green), press to return to True, release to return to False
ghandle.B3_is_pressed()
Function: Key B3 (blue), press to return to True, release to return to False
ghandle.B4_is_pressed()
Function: Key B4 (yellow), press to return to True, release to return to False
ghandle.rocker(state)
Function: Detect the joystick direction, if it is consistent with the parameter return
True , if it is inconsistent with the parameter return False
Parameters: state indicates the status of the rocker
ghandle.up ‐‐‐ rocker up
ghandle.down ‐‐‐ rocker down
ghandle.left ‐‐‐ rocker left
ghandle.right ‐‐‐ rocker right
ghandle.pressed ‐‐‐ rocker be pressed
ghandle.noState ‐‐‐ no any operation
ghandle.get_value_x()
Function: Returns the analog value of the X channel of the rocker. The value will
change when moving left and right. It increases to the left and decreases to the right.
ghandle.get_value_y()
Function: Returns the analog value of the Y channel of the rocker. The value will
change when moving up and down. It increases to the down and decreases to the
up.




