1.5 Superbit MicroPython API

www.yahboom.com
superbit.stepper_control(a, b)
Function:
Controlling stepper motors on expansion boards
Parameter:
a: Select the servo port numbersuperbit.B1-B2
b: Set the control angle (0-360)
B. ghandle library
1) import ghandle
Import handle library
2) ghandle.B1_is_pressed()
Function: Button B1 (red), press to return to True, release to return to False
3) ghandle.B2_is_pressed()
Function: Button B2 (green), press to return to True, release to return to False
4) ghandle.B3_is_pressed()
Function: Button B3 (blue), press to return to True, release to return to False
5) ghandle.B4_is_pressed()
Function: Button B4 (yellow), press to return to True, release to return to False
6) ghandle.rocker(state)
Function: Detect the direction of the rocker, if consistent with the parameter, return
True. If inconsistent with the parameter, return False
Parameters:
state: ghandle.up (up), ghandle.down (down), ghandle.left (left), ghandle.right (right),
ghandle.pressed (pressed), ghandle.noState (no operation)
7) ghandle.get_value_x()
Function: return to the analog value of the X channel of the rocker. Move to the left
to increase the value. Move to the right to decrease the value.
8) ghandle.get_value_y()
Function: return to the analog value of the Y channel of the rocker. Move to the
down to increase the value. Move to the up to decrease the value.