Getting Started with RTk Motor Controller Board
The new and improved RTK-000-001-V3 / Motor Controller Board for Raspberry Pi is now pre-soldered and features a new and improved design breaking out the GPIO Pins to the side of the board.
The Ryanteck Raspberry Pi Motor Controller Board is a simple to use & budget friendly motor controller board for the Raspberry Pi which allows you to easily control 2 motors in both directions with some simple coding!
Once you receive the board, simply place it on the Raspberry Pi’s GPIO header, screw in a power pack, add your motors and then start programming. We officially support Python & Scratch at this point in time although you can use it with any language that allows you to control the GPIO pins including C, Java, PHP, Bash, Node.JS etc.
What you need
To get started with using the RTK Motor Controller board you will need at least the following parts:
- Raspberry Pi Computer or RTk.GPIO Board
- RTK Motor Controller board
- DC motor
- Battery power pack
- Robot Kit (optional)
Getting Started
Step 1 – Download and install the latest version of Raspbian OS for your micro SD card from the Raspberry Pi foundation website – https://www.raspberrypi.org/downloads/raspbian/
Step 2 – Insert the Motor Controller board onto the Raspberry Pi’s GPIO header, making sure it is firmly pressed down to make good contact with the GPIO pins. The Motor Controller board must be inserted on pin 1, which is the top left most side of the Raspberry Pi GPIO header.
Step 3 – Insert the wires from the motors into the screw terminals on the motor controller board labelled Motor-1 and Motor-2.
Step 4 – Now insert the battery terminals into the VCC2 screw terminals on the motor controller board.
Step 5 – Boot up your Raspberry Pi by connecting the power supply and also insert the batteries to the motor controller board if you haven’t done so already.
Step 6 – Open up the terminal window and type in the following command to download the code examples for the motor controller board:
git clone https://github.com/PiSupply/Ryanteck.git
Navigate to the python examples directory by typing in the following:
cd /RTK\ Motor\ Controller/Software/basicPython/codeSamples/
Now run the demo program with the following command:
python cliController.py
Now on your keyboard use the keys W for forward, S for backwards, A for left and D for right. You should see that the motors move in the directions as set to those keys.