I would like to use buttonBox
(from Python easyGUI
) to trigger functions in Python. But I am not sure how to do it.
The buttonbox code is like this:
buttonbox(msg='Robot Moving', title=' ', choices=('MoveFwd', 'MoveBwd', 'TurnR','TurnL'), image=None)
I want to trigger robot to move forward by clicking the button "MoveFwd". The MoveFwd in Python is already down and compiled. See code below.
def MoveFwd():
ser = serial.Serial(3)
print ser.name
print 'Start Moving Fwd...'
ser.write('SetMotor RWheelDist 200 Speed 100 LWheelDist 200 Speed 100 \n')
moveFwd()
Then my question is, how to link these two together?