User Manual

48
MotorA and MotorB
Rotating speed of the MotorA and MotorB, assignable with value in [0 ~ 100].
my_pismart.MotorA = 30
my_pismart.MotorB = 90
MotorA_reversed and MotorB_reversed
Rotating direction of the MotorA and MotorB, assignable with value in [True False].
my_pismart.MotorA_reversed = False
my_pismart.MotorB_reversed = True
Say
Speech of the PiSmart, assigned with texts which the PiSmart will say.
my_pismart.Say = "Hello, world!"
listen
PiSmart will enter the process of listening, unassignable.
my_pismart.listen
heard
PiSmart is in the process of listening. Return True if any speech is heard. Unassignable.
if my_pismart.heard:
xxxx
result
After PiSmart heard something, result will acquire what's heard. Unassignable.
if my_pismart.result == "forward":
xxxx
An instance:
def loop():
my_pismart.listen # Begin to listen
if my_pismart.heard: # if heard something
SunFounder