The Motorshield is designed to help you get your Raspberry Pi-based Robot. This board can control the 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, and Maze-Solver Robots. Motor Driver for Raspberry Pi to control DC and Stepper Motors
Steps for Motor Shield software installation -
-
Open Terminal and download the code by writing:
git clone https://github.com/sbcshop/MotorShield.git
-
Your code will be downloaded to '/home/pi' directory. Use 'ls' command to check the list of directories.
-
Go to directory 'MotorShield' and open 'Test_Motor.py'
-
Run (Press F5) file 'Test_Motor.py'. This is the example code to run all the motors in 'Forward' and 'Backward' direction
-
For interfacing Stepper Motor use example code 'Stepper_Test.py'
Changes:
Added Motor, LinkedMotor, Arrow and Sensor classes. Allows user to specify what is "forward" and what is "reverse" without requiring re-wiring of the motors.