Close

Day_2

A project log for Simple RC Car

This is just a simple 4 wheeled robot car run by RPiZero and Arduino Mega

adityaprakash23AdityaPrakash23 02/04/2021 at 17:140 Comments

Today I managed to prepare the python code to run on the Raspberry Pi Zero W. The Pi Zero W is connected to the Redgear Elite Wireless gamepad via a wireless dongle attached to the only USB port on the Pi. The python code access the device files of the gamepad using Evdev library. Using the Evdev library I coded the movement commands. First the L1 button is pressed continously and then the direction command buttons are pressed. I have also added holonomic movement commands too. So the movement command generation is pretty much done. Next, using the serial library, I have coded the appropriate serial transmission messages that are supposed to be received by the Arduino Mega. The testing and debugging of any possible technical and logical bugs is only left now. I have still uploaded the code in a Github repo which will be updated if any corrections are needed.

I also did some work in 2nd phase. I have made serial connections between RPi Zero W and Arduino Mega. Using a bidirectional logic level convertor and 4148 diodes to protect RPi pins from reverse currents, now I have the serial communication connections established. This will also be tested tomorrow.

Tomorrow, after testing and debugging, motor control code will also be worked upon on the Arduino Mega.

Discussions