Bluetooth 4WD Robot & IR Remote Controlled RC Car

Опубликовано: 17 Сентябрь 2026
на канале: M
15,528
32

This is a project that I completed for my electronics course as part of a computing degree.

We were asked to program an Arduino using only embedded C. I wanted to do a project that I thought was fun, so I decided to attempt to program the Atmega 328 microcontroller, so that I could use an IR remote to move a RC car.

We were not given any lectures in C or more importantly embedded C and we were only taught very basic C in some labs. We were only shown how to light up LEDs and some other simple microcontroller hardware concepts.

My plan therefore was just to get the RC car to move forward and back and I wasn't sure I would even be able to achieve that at that point. I decided to undertake the project in two parts.

Part 1
The first part was to use a higher level language to code the project to begin with. The aim of this was to attempt to understand more about the hardware without the added complexity of learning C. I used the Arduino IDE with a 4WD robot that I built from a kit. This enabled me to use the more simple Arduino programming language and therefore more easily learn about and understand the hardware. I started out by building the 4WD robot and then programmed it to move when keys (WASD) were pressed on the keyboard using the serial monitor. At this stage the robot was connected by a USB cable, however this wasn't very practical. I added a bluetooth module to the robot and then wrote a C# GUI program to control the robot wirelessly. I learnt a lot doing this part of the project and decided to move onto the second part.

Part 2
The second part of the project involved removing all the electronics from a RC car leaving the motors. The motors were then connected to output pins on the motor shield. I started testing to get one motor to move in one direction using pulse width modulation. Once this was finally achieved I could then program the other directions. The final part was to translate the remote control code into C so that it would run with the rest of the C code and fulfil the requirements for the project.