Car Infrared Remote

Control RGB, buzzer and car motion status through infrared remote control.

Device connection

Hardware connection

Use Type-B data cable to connect Arduino Uno and computer.

Software connection

Open the "Arduino IDE" software and select the model and serial port number corresponding to the development board.

Implementation ideas

Use the infrared remote control with the infrared receiver to parse the data, and then control the corresponding peripheral status of the car according to the data.

IR remote controlParsed dataFunction
Power0x00Stop all peripheral functions
RGB0x40Switch RGB colors
Buzzer0xA0Control buzzer sound
Car Forward0x80Car forward
Car Backward0x90Car backward
Car Left0x20Car moves to the left
Car Right0x60Car moves to the right
Car Left Spin0x10Car rotates to the left
Car Right Spin0x50Car rotates to the right
Add0x30Increase speed
Sub0x70Decrease speed
Number 00xB0None
Number 10x08None
Number 20x88None
Number 30x48None
Number 40x28None
Number 50xA8None
Number 60x68None
Number 70x18None
Number 80x98None
Number 90x58None

Code Analysis

Here is only a brief introduction to the code content. For detailed code, please refer to the corresponding code file, which is provided in the download area!

Experimental results

After compiling the program successfully, upload the code to the Arduino Uno development board.

After the program is started, we can control the car's peripherals and motion status through the infrared remote control.

Use the infrared remote control to aim at the infrared receiver on the car expansion board to control the buttons. The APP only sets the functions of some buttons.

image-20240526230334829

Infrared remote controlParse dataFunction
Power0x00Stop all peripheral functions
RGB0x40Switch RGB colors
Buzzer0xA0Control the buzzer sound
Car Forward0x80Car forward
Car Backward0x90Car backward
Car Left0x20Car moves to the left
Car Right0x60Car moves to the right
Car Left Spin0x10Car spins left
Car Right Spin0x50Car spins right
Add0x30Speed increase
Sub0x70Speed reduction

The infrared remote controller controls the movement of the car. You need to press and hold to perform corresponding control: for example, long press the car to move forward, and release the button to stop the car.

Notes

In order to avoid infrared light interfering with the sensor, we need to use this module indoors.