Welcome to Roboduino V2 repository
02.Remote Control Car
Remote Control Car
Remote Control Car1. Download YahboomCam2. Assemble the car3. Build the development environmentDownload Arduino IDEInstall Arduino IDE4. Upload the programDevice connectionSoftware connectionUpload the program5. Program Startup6. Mode Selection7. APP remote control carAPP connectionAPP control8. Infrared remote control carInfrared control
1. Download YahboomCam
Android/IOS phone users can scan the QR code to download the remote control software
IOS users can also search and download [YahboomCam] in the Apple App Store

2. Assemble the car
Follow the assembly video to check whether all the hardware connections of the car are correct.
3. Build the development environment
The software used for the development environment is located in the [Software Resources: Software Tools] folder of the product information.
Download Arduino IDE
Unzip and open the Arduino IDE installation package provided in our information as an administrator.
Install Arduino IDE
It is recommended to check and install according to the following options.
Agree to the agreement

Installation options

Installation location

Complete installation

When using Arduino IDE for the first time, it will automatically initialize. You need to agree to the driver installation that pops up automatically and wait for the installation of the required software library to be completed!
4. Upload the program
Our car does not have a program when it leaves the factory, and users need to upload the program themselves.
xxxxxxxxxxNote: Before uploading the program, you need to disconnect the hardware connection between the WiFi camera and the car expansion board.
Device connection
Arduino Uno is below the expansion board. Before connecting to the computer, you need to disconnect the WiFi camera and the expansion board; then use the Type-B data cable to connect the Arduino Uno and the computer.

Check the serial port number
Open the system's built-in device manager and check the serial port device with the CH340 character in the port option. The system currently detects the port number of the Arduino Uno development board as COM8;
If the system does not detect the corresponding serial port device, you can install the serial port driver according to the tutorial.

Software connection
Download and open the Multi_Functional_Control_Car.ino file: Select the model and serial port number corresponding to the development board.
xxxxxxxxxxThe Multi_Functional_Control_Car.ino file is located in the [Software Resources: Car Code] folder
Development board selection: Click Tools → Board → Arduino AVR Boards → Arduino Uno
Serial port number selection: Click Tools → Port → COM8
xxxxxxxxxxPlease select the serial port device according to the serial port number recognized by your system

Upload the program
After completing the import of the third-party library: compile first and then upload the program.
xxxxxxxxxxBefore uploading the program, you need to install some third-party libraries. You can import third-party libraries according to the [Environment Construction: Using Third-Party Libraries] tutorial in our product information.
Verify option: Click ① → Compile successfully, and a pop-up window "Done compiling" will appear in the lower right corner of the Arduino IDE!
Upload option: Click ② → Upload successfully, and a pop-up window "Done uploading" will appear in the lower right corner of the Arduino IDE!

5. Program Startup
After the program is uploaded successfully, turn off the power of the car, install the connection between the WiFi camera and the expansion board, and then turn on the power of the car.
6. Mode Selection
After the program is started, the RGB light on the car expansion board will display white, indicating that the remote control function mode selection stage has been entered.
Mode switch: Press the K1 button on the car expansion board to switch between two remote control modes. The mode switching time is about 5 seconds. Once the RGB does not display color, it means that the function switching mode is over and the last selected remote control mode is retained.
RGB light shows white: WiFi remote control car mode
RGB light shows red: infrared remote control car mode
xxxxxxxxxxIf you want to switch the remote control mode again, you can press the Reset button on the development board to restart the program!
7. APP remote control car
The car function mode needs to select WiFi remote control car mode: the initial setting is WiFi remote control mode after the program starts. Please wait for 5 seconds before remote control operation.
APP connection
The mobile phone connects to the hotspot of the WiFi camera (the name of the built-in hotspot: Yahboom_ESP32_WIFI), and then open the YahboomCam software.
Some mobile phones will prompt for connecting to a hotspot without a network. We need to click to keep connected!

Enter IP:192.168.4.1 in the YahboomCam software, then click to log in and enter the APP control interface.
xxxxxxxxxxThe IP of the WiFi camera's built-in hotspot is 192.168.4.1

APP control
After entering the APP interface, the APP will display the camera screen.
xxxxxxxxxxIf there is no display, check whether the phone is connected to the WiFi camera hotspot normally

Left button
Control the movement of the car: U (forward), D (backward), L (left move), R (right move), S (stop), LT(left rotation), RT(right rotation)
Right button
Control the rotation angle of the servo: CL(rotate left), CR (rotate right), CU (rotate upward), CD (rotate downward)
Note:
Image problem: Due to the installation problem of the WiFi camera on our car, we need to check the horizontal flip and vertical rotation of the camera, so that the displayed image will be normal!
Servo control problem: Our car is only equipped with one servo, so it can only be controlled by the left and right of the servo, and the rotation range is controlled in front of the car [35°, 145°].
xxxxxxxxxxThe car program limits the rotation angle of the servo sent by the APP, and the control rotation range is [35°, 145°], which is to avoid collision or squeezing between the WiFi camera and the car expansion board.
8. Infrared remote control car
The car function mode needs to select the infrared remote control car mode: please press the K1 button within 5 seconds after the program starts. When the RGB light of the expansion board changes from white to red, it means that the mode is switched to infrared remote control.
Infrared 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.

| Infrared remote control | Parse data | Function |
|---|---|---|
| Power | 0x00 | Stop all peripheral functions |
| RGB | 0x40 | Switch RGB colors |
| Buzzer | 0xA0 | Control the buzzer sound |
| Car Forward | 0x80 | Car forward |
| Car Backward | 0x90 | Car backward |
| Car Left | 0x20 | Car moves to the left |
| Car Right | 0x60 | Car moves to the right |
| Car Left Spin | 0x10 | Car spins left |
| Car Right Spin | 0x50 | Car spins right |
| Add | 0x30 | Speed increase |
| Sub | 0x70 | Speed 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.
In order to avoid infrared light interfering with the sensor, we need to use the infrared remote control function indoors