User Manual

83
GPIO.output(MotorPin2, GPIO.LOW) # Make the motor rotate clockwise
time.sleep(5) # rotate for 5 seconds
GPIO.output(MotorEnable, GPIO.LOW) # Stop the motor
time.sleep(5) #wait for 5 seconds
Code for motor counter-clockwise rotation is similar to sketch above
Now, you should see the motor blade rotating.
Further Exploration
You can use buttons to control the clockwise and counterclockwise rotation of the motor
blade based on the previous lessons. Also you can apply the PWM technology to control the
rotation.
SunFounder