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

In this project we will connect Robot Car to WIFI and Use an APP to control the car through Internet. This is a typical Internet of Things(IoT) Application. Phone APP controls the car movement, and temperature & humidity sensor module sends temperature and humidity to your phone.

Please prepare the following parts to complete this project

NOTE:
1.the color of the building block is subject to the actual product, which does not affect the use.
2. ALL OSOYOO PRODUCTS FOR ARDUINO ARE THIRD PARTY BOARD WHICH IS FULLY COMPATITABLE WITH ARDUINO


Before you build the robot with blocks, please install OSOYOO basic board for Arduino under OSOYOO Magic I/O shield as following (Attention please : the pins of I/O shield is aligned with the port of basic the board firstly, then press the shield tightly on the board).

Please follow the building steps to build this robot car, If you want to get clear PDF building steps, please download from https://osoyoo.com/picture/Building_Robot_Car/lesson7/lesson7.pdf

Note: If you have built the robot car for lesson6, please skip to the step58 in this PDF.

Please connect motors and 9V battery case as lesson1.

Then connect the middle four pins of OSOYOO WIFI Module connect to VCC/GDN/D2/D3 slot of Magic I/O shield, connect servo motor to D4 port as following (Attention please: there are six jumper caps on ENA/ENB/IN1/IN2/IN3/IN4)


Note:  This lesson use Arduino IDE as programming tool.

Step 1: Install Arduino IDE. Download Arduino IDE from https://www.arduino.cc/en/Main/Software?setlang=en , then install the software. If you have install Arduino IDE, please skip this step.

Step 2: Install WifiEsp-master library into IDE (If you have already installed WifiEsp-master library, please skip this step)
Download WifiEsp-master library from https://osoyoo.com/driver/WiFiEsp-master.zip, then import the library into IDE (Open IDE-> click Sketch->Include Library->Add .Zip Library)

Step 3: Install OsoyooIOT Library into IDE (If you have already installed OsoyooIOT Library, please skip this step)
Download OsoyooIOT Library from https://osoyoo.com/driver/wifi-iot/OsoyooIOT.zip, then import the library into IDE (Open IDE-> click Sketch->Include Library->Add .Zip Library)

Step 4: Install DHT Sensor Library into IDE (If you have already installed DHT Sensor Library, please skip this step)
Download DHT Sensor Library from https://osoyoo.com/wp-content/uploads/samplecode/DHT.zip then import the library into IDE (Open IDE-> click Sketch->Include Library->Add .Zip Library)

Step 5:Download sample code from https://osoyoo.com/picture/Building_Robot_Car/lesson7/wifi-block-car.zip, and unzip the downloaded zip file wifi-block-car.zip, you will see a folder called wifi-block-car.

Step 6: Connect OSOYOO basic board for Arduino to PC with USB cable, Open Arduino IDE -> click file -> click Open -> choose code “wifi-block-car.ino” in wifi-block-car folder, load the code into Arduino. (Notice: Please turn off power when your Robot is connected to Personal Computer or Laptop via USB cable)

Step 7: You need change the code Line 38 and Line 39 as your router wifi ssid name and password :

char ssid[] = “***”; // replace *** with your router wifi SSID (name)
char pass[] = “***”; // replace *** with your router wifi SSID (password)

Step 8: Choose corresponding board and port for your project, upload the sketch to the board.

Step 9: click the Serial monitor window in upper right corner of IDE, you will see following result (Note: your PC and the robot are connected with the same LAN network):

TIPS:

If you find the speed for the car is slow or fast, please open the code and change the value of line33 to line35 as the following:

#define FAST_SPEED 180
#define MID_SPEED 130
#define SPEED 120

APP Installation and Setting:
Step 1) Download OSOYOO Iot udp APP by searching OSOYOO Iot udp APP from Apple Store(iPhone/iPad) or Google Play Store(Android device).

Step 2): Install the OSOYOO Iot udp APP in your Phone and make sure your Cell phone is connected with the same LAN Network of your robot car for Arduino.

Step 3): Set IP Address in APP
1)Open APP, click Setting button in upper right corner
2)Use the IP address you get in serial monitor window (For our robot is 192.168.0.8) to replace default IP 192.168.1.255
3)keep default port number 8888 without changing
4)turn on the switch of UDP Response Text Display
5)Click Save button to save the changes you just made
6)Click Back Arrow to go back APP front UI

Control the robot car:

You can use the Arrow keys to control the car movement and see the temperature and humidity detected by the DHT11 sensor in your car when you click any button.

Move Forward
Move Backward
Left Turn
Right Turn
[] Stop


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 OSOYOO Ultrasonic Detector Module Click here to buy
4 OSOYOO IR Receiver Module Click here to buy
5 OSOYOO Red button module Click here to buy
6 IR remote controller Click here to buy
7 9V Battery Box Click here to buy
8 9V Battery Click here to buy
9 Servo Click here to buy
10 Motor Click here to buy
11 OSOYOO Tracking Sensor Module Click here to buy
12 OSOYOO Photoresitor Module Click here to buy
13 OSOYOO Photoresitor Module Click here to buy
14 OSOYOO Ultrasonic Sensor Block Click here to buy
15 OSOYOO ESP module Click here to buy
16 3 pin 20cm PnP cable Click here to buy
17 4 pin 20cm PnP cable Click here to buy
18 B117 Click here to buy
19 B115 Click here to buy
20 B113 Click here to buy
21 B111 Click here to buy
22 B109 Click here to buy
23 B107 Click here to buy
24 B105 Click here to buy
25 B103 Click here to buy
26 T024 Click here to buy
27 T016 Click here to buy
28 L024 Click here to buy
29 X064 Click here to buy
30 L035 Click here to buy
31 X044 Click here to buy
32 F057 Click here to buy
33 T033 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 Z101 Click here to buy
40 Z1S1 Click here to buy
41 A024 Click here to buy
42 A013 Click here to buy
43 A050 Click here to buy
44 A05S Click here to buy
45 A08S Click here to buy
46 A060 Click here to buy
47 A03S Click here to buy
48 Z121 Click here to buy
49 X275 Click here to buy
50 X073 Click here to buy
51 Y001 Click here to buy
52 Z102 Click here to buy
53 P012 Click here to buy
54 P011 Click here to buy
55 wheel Click here to buy
56 universal wheel Click here to buy