sbcshop / MotorShield

Designed to help you get your Raspberry Pi based Robot. This board can control DC motor as well as the stepper motor. You can connect your IR and Ultrasonic sensors to tell your robot about its environment. You can easily make your Line Following, Object following, Wall following, Maze-Solver Robots.
https://shop.sb-components.co.uk/products/motorshield-for-raspberry-pi
52 stars 47 forks source link

Code not working #6

Open GrahamDouglas62 opened 6 years ago

GrahamDouglas62 commented 6 years ago

We have accurately followed the code described in your document: "Maker-SphereMotorShieldv1.pdf". we have only one motor connected to MOTOR1 connectors. We are using the following code to get the motor the run with no luck.

From PiMotor import Motor import time m1 = Motor("MOTOR",1) m1.forward(50) time.sleep(2) m1.stop()

We have successfully copied PiMotor.py to the local folder on the Raspberry Pi. We are getting no errors and are seeing "Forward" and "Stop" as a result when we run the code. However the motor does not spin as expected. Are we missing a simple step that your documentation skips? If we connect the motor directly to the battery pack it spins fine. When connected via the motorshield hat, nothing.