Introduction: Python + Arduino, CarControl V.03
Step 1: Step 0: Get Comfortable With the Arduino.
You can get an Arduino Uno from Amazon for about $15 and you will need to download the Arduino IDE from Arduino.org. The language is based on c/c++ and you will find many tutorials on this and other websites. I suggest you walk through the examples and get comfortable with Arduino before you try to take on this or any other project. It will help. The Arduino IDE has more the enough examples you can play around with to get to know the board.
Step 2: Step 1: Taking Apart the Remote
We will begin by taking apart the remote. Be careful not to force anything apart. Be sure to stop and test the remote operation at each step. If you mess something up you will make life a lot harder for yourself. Pay attention to the details.
Step 3: Step 3: Study the Board
You will have to figure out how the board operates in order to figure out how to connect it to the Arduino. Using a wire you should be able to trace the board and figure out which 2 connection you need to connect in order to move the car. Once you figure that out you can send a signal from the Arduino pins and test weather you are moving the car or not. Remember that you are looking for 4 connections, one for each car command, forward, reverse, left and right.
Step 4: Step 4: Python + PyGame
Using Python and the PyGame Library you can receive keyboard keys pressed and output a command to the serial port. This will allow us to process key events and send an sppropriate signal to the Arduino via USB.
Step 5: Step 5: the Arduino Code
You will have to write some Arduino code that will implement the logic of movement. The signal coming from the python program is a number which correspond to a particular mvment. That means that a command is simply switching the output pin from LOW to HIGH or from HIGH to LOW. You can Download CarControl complete from my website.
8 Comments
4 years ago
http://thelivingpearl.com/2013/01/04/drive-a-lamborghini-with-your-keyboard/ Link is not working 404 not found? Can i get the demo code?
4 years ago
Can I have similar thing on Raspberry PI instead of Arduino, Any links will help
Cheers
Srini B
4 years ago
WHAT if we don't use breadboard......can i just directly connect to arduino????
Question 5 years ago on Step 3
Do we have to use any resistors or directly connect pins via breadboard??
Thanks in advance
6 years ago
Very good project, but im missing the full instructions. your link is not opening.
6 years ago
thx for sharing such a nice work :-)
7 years ago
I love the combination of Python and the Arduino. So I have created a collection about it. I have added your instructable, you can see the collection at: >> https://www.instructables.com/id/Arduino-and-Pytho...
10 years ago on Introduction
Very Nice