|
The program we use to control the robot may not be the way you think.
Assuming you have a certain python foundation:
import move.py #Import the move module under the serve folder
move.setup () #initialize
move.move (100, 'no', 1) # move.move is used to control the wheel. Parameter 1 is the wheel speed. If the setting is too small, the car cannot move. Parameter 2 determines whether to turn, and can be configured as 'left', 'right' or 'no'. Parameter 3 is the steering angle. Setting it too small will cause the steering of the car not apparent.
ime.sleep (5) #Using time.sleep to make the car move for a period of time with the parameters set by move.move
move.motorStop () #Use move.motorStop to stop the car.
move.destroy () #It is best to call move.destroy at the end of the program.
|
|