Note: ALL OSOYOO Products for Arduino are Third Party Board which is fully compatible with Arduino

Authorized Online Retailers

Where to buy the set with 18650 batteriese and USB charger

Buy from OSOYOO Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

Buy the V2.1 Robot car without Battery and charger:

Buy from OSOYOO Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

Objective:

In this lesson, we will use Mobile to control our robot car and make an imitation driving. Since is a mock driving, we will use a virtual steering wheel and gear in our APP to imitate their counterparts in real car.

You must complete lesson 1 (assembling the car) before you continue on with this lesson.

Parts and Devices

No. Picture Device Qty. Accessories Link
1 HC module 1 Click here to buy

Hardware Installation

Step 1: Install the smart car basic frame work as per Smart Car Lesson 1 . If you have already completed installation in Lesson 1 , please remove all wires on Osoyoo basic board

Step 2: Connect Bluetooth TX/RX ports to D4,D5 with jumper caps

Note: Our OSOYOO Uart WiFi shield V1.3 are connected BLE URAT TX/RX ports to D4,D5 with jumper caps by default. If you find the Bluetooth TX/RX ports is not connected to D4,D5, you need use a jumper cap or jumper wire to connect B-TX to D4 and B-RX to D5

 Step 4: Insert Bluetooth Module into OSOYOO Uart WiFi shield V1.3 Bluetooth slot as following graph:


Step 3: Connect OSOYOO MODEL X motor driver module and OSOYOO Uart WiFi shield V1.3 as following graph:

Remember following tips restore your motor control system to lesson 1:

  • If your last project is lesson 1,2,3,4, your motor control system is same as Lesson 1, no need do anything.
  • If your last project is lesson 5,6, you need change ENA wire from D3 to D9, keep wiring in D6,D7,D8,D11,D12 at same position and remove all other wires in OSOYOO Uart WiFi shield V1.3.

I suggest you run the sketch code in Lesson 1 and make sure motor connection is correct. This is very important for next steps.


Software Installation;

Open-source Arduino
Software(IDE)
Download IDE here:
https://www.arduino.cc/en/Main/Software?setlang=en
7 zip is a free zip
utility that un-zips zip files
Download 7zip here for free
https://www.7-zip.org/
OSOYOO imitation driving Robot APP
search “OSOYOO imitation driving” in
Google Play Google Play or Apple APP store
(
Note: If you can not find this APP in Google Play,
you can directly download the APP from following link: https://osoyoo.com/driver/v1car.apk )

Step 1: Install APP into your mobile phone:

1) Install APP on Android device as following

In Google Play store search APP name “OSOYOO imitation driving”, download the APP as following and install it in your smart phone

If you can not use Google Play to find the APP, please Download the APP from following link :https://osoyoo.com/driver/v1car.apk.

2) Install APP on Apple IOS device as following

In Apple APP store search APP name “OSOYOO imitation driving”, download the APP as following and install it in your smart phone

Step 2: Download and install sketch code from v2smartcar-lesson7. Unzip this file, and you will see a folder called v2smartcar-lesson7. Open IDE -> click file -> click Open -> choose code “v2smartcar-lesson7.ino” in v2smartcar-lesson7 folder, load the code into your board

Explanation of APP UI

    • Connect HC-02 bluetooth in Android phone. There is a BT Search button in Android APP: When click this button, you will see a Bluetooth device list which has been paired with your APP. Select HC-02 device to connect the car. Once HC-02 is connected, Bluetooth Status will change from Disconnected to Connected. You can only control your car when Bluetooth is connected.
    • Connect HC-02 bluetooth in iPhone/iPad , simply click Connect button, a HC-02 device will show up in a pop-up list. Click that HC-02 device will connect Bluetooth module to your iPhone. Then the Connect button will change name to Disconnect.
    • Engine toggle : When Engine toggle is set to OFF(white), car will stop and all buttons in the APP will be disabled. When Engine toggle is set to ON(red), car will start to move. All other movement control buttons will active.
    • Forward/Backward gear switch: This gear switch can control the car is moving ahead or reverse like real car gear.
    • F1,F2,F3,F4,F5 customized button. In this lesson, we only use F5 which pause the the car movement. The difference between F5 and Engine OFF button is that Engine OFF button when touched, all other buttons will be disabled. You should toggle Engine button again to enable other button. On the other hand, when F5 is clicked, the car will stop but all other buttons is still active. Even you do not touch any button just change your cell phone angle position(like you move the steering wheel), the car will move again.
    • Direction Steering Wheel : When you rotate your mobile phone angle, the steering wheel will change angle as per your mobile phone rotation angle. This will make your car change direction. For example, when steering wheel make clockwise rotation, car will move to left. Remember, the steering and Forward/Backward gear should work together same as you are driving a real car. For example, when you want back your car to a right side packing lot, you need set Gear to R position and rotate your steer to count-clockwise direction.
    • Speed+: Make the robot car speed up
    • Speed-: Make the robot car slow down

Connect APP to HC-02 Bluetooth Module

  • Connect with Android device:
    If you use Android device and have not paired Bluetooth module with your cell phone, please pair the bluetooth module first before open the APP. In your cell phone Setting->Bluetooth ,find a Bluetooth device called HC02, pair it with password 1234.After bluetooth HC02 device is paired, open the APP.   Click BT Search Button to connect APP to HC02 device.
  • Connect with iOS device:
    If you use iOS device, simply open the APP, click Connect button, you will see a Bluetooth list, select the HC02 device .

Note: For Android device, when you click BT search button and get the following error pop, Please follow the next steps:
1. long-press the APP inco, then click “APP info”
2. click “Permissions”
3.click “Nearby device”, then change the option as “Allow” (To learn more about settings, you can visit the video: https://osoyoo.com/picture/V2.1_Arduino_Robot_Car/Lesson7/APP.mp4)

Drive your Robot Car

Now you have installed your hardware and software for this lesson, let’s drive our car!

Step 1)Put your robot car onto the ground and turn on the switch.

Step 2)Go to your mobile phone ->Setting ->Bluetooth setting and search a Bluetooth device called HC-02, pair it with code 1234

Step 3)Open OSOYOO imitation driving Robot APP, Click BT Search button and find the bluetooth you have paired

Step 4)Turn on Engine toggle, click Speed+ to make the robot speed up as the robot car is very slow at first. When you rotate your mobile phone angle, your car will change direction.

Enjoy your driving!