These are instructions in order to build your own remote controlled car, controlled using a wireless Xbox 360 controller.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts Required
- Xbox 360 controller
- Xbox 360 remote receiver
- Raspberry Pi 3 https://www.amazon.ca/CanaKit-Raspberry-Complete-...
- Car kit - We recommend using a car kit with better motors and a better motor controller than we use. This one gave out after roughly 15mins of continuous use. https://www.amazon.ca/CanaKit-Raspberry-Complete-...
- Power Source for the Raspberry Pi, such as a portable USB charger
- Batteries for the motors
- Wire Soldering Station
- Tape/glue/zip ties/garbage ties/bread ties to keep wiring clean.
- 2x white 5mm 2 pin LED
- 2x red 5mm 2 pin LED
- 4x yellow 3mm 2 pin LED
- 3x blue 3mm 2 pin LED
- 3x red 3mm 2 pin LED
- 1x 330 OHM resistor
- 4x 100 OHM resistor
Step 2: Assemble Your Car
Follow the given instructions in your car kit in order to assemble it.
Step 3: Wire It All Together
For the motors, first wire them to your motor controller, then wire the motor controller to your Raspberry Pi. Depending on which pins you use, you may have to alter the code given in the next step.
For the lights, a wiring diagram and example is provided as an image. Also wire these to your Raspberry Pi.
Step 4: Coding
There are two python libraries that must be downloaded:
The Xbox library allows us to take control of our car via remote receiver. As the Raspberry Pi has a limited number of PWM pins, WiringPi is used to emulate them so all wheels behave the same way.
Download the included code and save it somewhere on your Raspberry Pi. Some pins may be different, depending on how your wires are set up.
You will also have to make sure your code can run automatically when the Pi boots.
Step 5: Final Touches
Connect the Xbox 360 wireless receiver into one of the Pi's USB ports, as well as your power source.
At this point your car should be running.
- Right trigger moves the car forward
- Left trigger moves it backwards
- Both triggers at the same time slows the car down
- Left stick controls the amount of power that goes into each wheel, turning the car