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

This lesson will use the programming tool —— IDE for Arduino to complete the robot car control by WIFI APP. In this lesson, the car is controlled by phone APP to move forward, backward, turn right and left and open finger servo to catch object and unload object.

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 COMPATIBLE 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/lesson6/lesson6.pdf
Note: If you have built the robot car for lesson1, please skip to the step35 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 D8 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:Download sample code from https://osoyoo.com/picture/Building_Robot_Car/lesson6/robot-arm-car.zip, unzip the download zip file robot-arm-car.zip, you will see a folder called robot-arm-car .

Step 5: Connect OSOYOO basic board for Arduino to PC with USB cable, Open Arduino IDE -> click file -> click Open -> choose code “robot-arm-car.ino” in robot-arm-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 6: You need change the code Line 35 and Line 36 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 7: Choose corresponding board and port for your project, upload the sketch to the board.

Step 8: 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 line31 to line33 as the following:

#define FAST_SPEED 50
#define MID_SPEED 50
#define SPEED 50

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). (Note: If you can not find this APP in Google Play, you can directly download the APP from following link: https://osoyoo.com/driver/udp-app.apk )

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)Click Save button to save the changes you just made
5)Click Back Arrow to go back APP front UI

You can use the Arrow keys to control the car movement. APP Button Action

Move Forward
Move Backward
Left Turn
Right Turn
[] Stop
F1 Open Finger
F2 Close Finger

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