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.
Step 1: Install the smart car basic frame work as per Lesson 1 . If you have already completed installation in Lesson 1 , just keep it as is.
Step 2: Insert Bluetooth Module
please insert Bluetooth slot as following graph (Remember: DO NOT remove any existing wires installed in Lesson 1), Also make sure the two jump caps in following red square are connected D11, D4(if they are connected to D1,D0, move the caps to D11, D4).
Verbinde das OSOYOO Basic Board für Arduino mit einem USB-Kabel mit dem PC, öffne die IDE -> klicke auf Datei -> klicke auf Öffnen -> wähle den Code “lesson6a.ino” im Ordner “lesson6a” aus, lade den Code auf das Board.
Hinweis: Schalten Sie Ihre Batterie aus oder ziehen Sie Ihren Netzadapter aus, wenn Sie den Sketch-Code auf das OSOYOO Basic Board für Arduino hochladen.
SCHRITT 4:
Wähle das entsprechende Board und den Port für dein Projekt aus und lade den Sketch auf das Board hoch.
SCHRITT 5:
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
In Apple APP store search APP name “OSOYOO imitation driving”, download the APP as following and install it in your smart phone
Explanation of APP UI (UI is different between Android and IOS)
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 to 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
Testen
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 .
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 battery 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.
1. Please make sure the two jump caps connected D11, D4
2. Please make sure you have turned on the bluetooth of your phone.
3. Please scan bluetooth device and match HC02 in setting of Phone
Hi, Can I use an HC-05 bluetooth module instead of the HC-02 they give you? I want to try another bluetooth control app, but none of them support the HC-02 module.
Yes, the pin definitions of the HC-05 do match with the HC-02
When I try connecting my robot to another Bluetooth control APP, it says that it doesn’t support the HC-02 module, and it only supports HC-05, and HM-10.
I even tried putting the HC-05 directly into the HC-02 slot, but the module doesn’t connect to the Arduino.
So if I connect the HC-05 module to the Osoyoo bluetooth slot with Male-To-Female wires, will it work?
You can put HC-05 to replace OSOYOO HC-02 and run our lesson 6 sketch code and APP. But if you want to put HC-05 in our car then use other people’s APP and run other people’s sketch code, we can not guarantee it will work.
Helloo, i have a problem. The bluethoot doesn’t appear in the configuration.
I turn on the HC module but still the same.
1. Please make sure the two jump caps connected D11, D4
2. Please make sure you have turned on the bluetooth of your phone.
3. Please scan bluetooth device and match HC02 in setting of Phone
Thx. It works.
I did everything correctly and made sure of it, however when I try to drive the car it won’t work, despite it being connected to the HC module.
Are you willing to take a video about this and send to my email address: [email protected]
Sure.
Hi, Can I use an HC-05 bluetooth module instead of the HC-02 they give you? I want to try another bluetooth control app, but none of them support the HC-02 module.
Please confirm whether the Pins definition of HC-05 is the same with HC-02
Is there any error when you use HC-02 module with other bluetooth control APP?
Android and IOS device can connect with HC-02.
Yes, the pin definitions of the HC-05 do match with the HC-02
When I try connecting my robot to another Bluetooth control APP, it says that it doesn’t support the HC-02 module, and it only supports HC-05, and HM-10.
I even tried putting the HC-05 directly into the HC-02 slot, but the module doesn’t connect to the Arduino.
So if I connect the HC-05 module to the Osoyoo bluetooth slot with Male-To-Female wires, will it work?
You can put HC-05 to replace OSOYOO HC-02 and run our lesson 6 sketch code and APP. But if you want to put HC-05 in our car then use other people’s APP and run other people’s sketch code, we can not guarantee it will work.