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

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 2 Basic Movement before you continue on with this lesson.

If you don’t complete the frame of car, please review lesson 1

If you don’t complete the basic wire connection, please review lesson 2

Connection:

Remove Jumper caps on ENB,IN3,IN4

Insert WiFi Module (VCC,GND,D2,D3) into OSOYOO motor shield as following graph (Remember: DO NOT remove any existing wires installed in Lesson2):

PART Motor Shield
IN1 jumper D12
IN2 jumper D11
ENA jumper D5
Steer Servo D9
Back Motor Cable K1 or K2
Left Tracking Sensor D6
Right Tracking Sensor D7
E_TX jumper D4
E_RX jumper D11

Step 1) 

Download OSOYOO WIFI UDP Robot Car control APP
In Google Play or Apple Store, please search key words “OSOYOO iot UDP Robot Car”, you will find a red icon APP as following:

Step 2)Please download PWMServo library from https://osoyoo.com/driver/sg90car/PWMServo.zip  if you haven’t installed the library in lesson 2.

Also Please download the WifiESP-Master library zip file from https://osoyoo.com/driver/WiFiEsp-master.zip

Now Open Arduino IDE ->click Sketch ->Include Library ->Add .ZIP library , then load above two zip files into OSOYOO Basic Board for Arduino.

Step 3) Sketch code Installation:

1) Please download   sketch code from https://osoyoo.com/driver/2022008400/lesson5.zip . Unzip the file, you will see a folder  lesson5.ino . Open Arduino IDE -> click file -> click Open -> choose code file lesson5.ino in above folder, load the code into OSOYOO Basic Board for Arduino

2) You need change the  wifi SSID and passsword in line 52,53

char ssid[] = “***”; // replace *** with your router wifi SSID

char pass[] = “***”; // replace *** your wifi password

3) Please change the default value 90 in line 19 as the FRONT value in lesson 1. If you align the wheel direction via the option 1 in Step 5, please skip this step.

#define FRONT 90        //degree when steering facing straight forward

4) Upload the sketch to OSOYOO Basic Board for Arduino. Finally, click the Serial monitor window in upper right corner of Arduino IDE, you will see following result:

5) In this mode, your will see an IP address which is our LAN IP address assigned by my router. Please write down this IP address and click Setting to set up robot IP address and set this IP address to your APP Setting section and Port to 8888 in settings.

Now your Robot car is connected to your LAN, you can use Mobile phone under same LAN to control the robot car. If your APP is in WAN, you need to go to your Router Control Panel, forward Port 8888 to Robot car LAN IP address, then you can use Router IP to control the car. This feature makes our robot car A REAL INTERNET OF THING device


how_to_play.png (1150×56)

Turn on the car. Now click Setting to set up robot IP address.

A) you need connect cell phone to the same LAN ssid of your robot car and set IP address same as the Robot IP showed in Arduino Serial Monitor.

You can click the button to make left turn(rotate steering wheel  counterclockwise) , click button to make right turn (rotate steering wheel   clockwise)
button will make car move forward and key will make car move backward.

If you press F7 key, the car will do line tracking.

No. Picture Device Link
1 OSOYOO Basic R3 Board for Arduino Click here to buy
2 OSOYOO Magic I/O Shield for Arduino Click here to buy
3 ESP8266 WIFI Shield Click here to buy
4 HC Module Click here to buy
5 Tracking Sensor Click here to buy
6 OSOYOO Red LED module Click here to buy
7 3 pin 20cm PnP cable Click here to buy
8 Wheel  Click here to buy
9 Servo Click here to buy
10 Motor Click here to buy
11 1Pair 18650 batteries Click here to buy
12 18650 battery box Click here to buy
13 Battery charger Click here to buy
14 K115 Click here to buy
15 K109 Click here to buy
16 K105 Click here to buy
17 K103 Click here to buy
18 B117 Click here to buy
19 B113 Click here to buy
20 B113 Click here to buy
21 B109 Click here to buy
22 B107 Click here to buy
23 B105  Click here to buy
24 B105 Click here to buy
25 B103 Click here to buy
26 B102 Click here to buy
27 B102 Click here to buy
28 X275 Click here to buy
29 X073 Click here to buy
30 X064 Click here to buy
31 X044 Click here to buy
32 L024 Click here to buy
33 L024 Click here to buy
34 PS11 Click here to buy
35 P021 Click here to buy
36 P011 Click here to buy
37 Z005 Click here to buy
38 Z010 Click here to buy
39 L035 Click here to buy
40 LT33 Click here to buy
41 S225 Click here to buy
42 D107 Click here to buy
43 D105 Click here to buy
44 G110 Click here to buy
45 F057 Click here to buy
46 Z2S1 Click here to buy
47 Z2S1 Click here to buy
48 Z121 Click here to buy
49 T220 Click here to buy
50 T112 Click here to buy
51 T008 Click here to buy
52 A04T Click here to buy
53 A040 Click here to buy
54 A050 Click here to buy
55 A070 Click here to buy
56 A160 Click here to buy
57 A02X Click here to buy
58 Q111 Click here to buy
59 PS21 Click here to buy
60 Q112 Click here to buy
61 Q113 Click here to buy
62 Q114 Click here to buy
63 Q115 Click here to buy
64 Z102 Click here to buy
65 Q116 Click here to buy