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.

OSOYOO Mecanum Wheels Robotic Car Chassis x 1 (2x left-wheels/2x right-wheels and 4x motor)
OSOYOO Mega2560 board fully compatible with Arduino
OSOYOO V1.0 Wifi Shield x 1
OSOYOO Model X motor driver x 2
OSOYOO Battery box x 1
18650 Batteries(3.7V) x 2

If you just finishes all  Lesson 1Lesson3 please keep all lesson connections same as it is. Then plug out bluetooth from Wifi Shield.

Remove the connection B_TX and B_RX to D18 and D19.

Connect E_TX  to D19(RX1) and E_RX to D18(TX1)

(Note: You need split 2 pcs of male-to-female jumper wires from our 10-pc jumper wire bundle. Any color from the bundle will be ok. The rest of 8 pcs wires are as spare parts for potential broken or damaged wires.)

Open-source Arduino
Software(IDE)
Download Arduino 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 Wifi Robot APP search “Osoyoo Wifi Robot APP” in
Google Play or Apple Store

STEP 1: Install latest Arduino IDE (If you have Arduino IDE version after 1.1.16, please skip this step). Download Arduino IDE from https://www.arduino.cc/en/Main/Software?setlang=en , then install the software.

STEP2: Please download the library zip file from WiFiEsp-master .Open Arduino IDE ->click Sketch ->Include Library ->Add .ZIP library , then load above zip file into Arduino.

STEP3: APP installation-you need search “Osoyoo Wifi Robot APP” in Google Play or Apple Store, and then install this APP.

STEP4: Arduino Sketch code Installation:
Robot Car can work in two Wifi modes:AP mode and STA mode. The Arduino sketches for these two modes are different. Let’s explain these two modes one by one

When working in AP mode, our robot car itself will become a Wifi Hot Spot. Our cell phone can connect to Robot Car as its wifi client. The IP address of Robot is fixed as 192.168.4.1 and It is not connected to WAN.
(1) Please download sketch from following link: https://osoyoo.com/driver/mecanum/mecanum-2560-lesson5A.zip. Unzip the file and you will see a folder named mecanum-2560-lesson5A,  load the code into Arduino

(2) Open your Arduino Serial monitor, and you will see a similar result as AP mode. A new Wifi SSID “osoyoo_robot” with IP address 192.168.4.1 will show up in the window. This means your Robot car has a Wifi Hot Spot name “osoyoo_robot” , its IP address is 192.168.4.1

(3) Connect your cell phone to “osoyoo_robot” wifi hot_spot, and set IP address as “192.168.4.1” to your APP Setting section


(4)Now your Robot car become a Wifi Hot Spot, you can use Mobile phone control the robot car.


(5)You can click the “< " ">” ” ^” ” v ” direction keys to make the car move. Use “||” pause key to stop the car movement.
Click Obstacle to shift left side, Click Tracking to shift right side.
Click F1 to make upper-left diagonal movement, Click F3 to make upper-right diagonal movement
Click F4 to make back-left diagonal movement, Click F6 to make back-right diagonal movement.


In STA mode, robot car does not work as a wifi hotspot. Instead, it will become an internet node in your LAN. You need tell Arduino sketch what is your local router’s Wifi SSID and password, then Arduino talks to router and get its own LAN IP address from DHCP server. You can use Mobile APP to access the robot car’s IP address and control its movement.

(1) Please download STA mode sketch code from https://osoyoo.com/driver/mecanum/mecanum-2560-lesson5B.zip . Unzip the file and you will see a folder named mecanum-2560-lesson5b, then load themecanum-2560-lesson5b.ino code into Arduino

(2) You need change the code Line 176 and Line 177 :

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

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

(3) Upload the sketch to Arduino. Finally, click the Serial monitor window in upper right corner of Arduino IDE, you will see following result:

(4)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 (no need change default port 80 in APP).

(5)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 80 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

(6)You can click the “< " ">” ” ^” ” v ” direction keys to make the car move. Use “||” pause key to stop the car movement.
Click Obstacle to shift left side, Click Tracking to shift right side.
Click F1 to make upper-left diagonal movement, Click F3 to make upper-right diagonal movement
Click F4 to make back-left diagonal movement, Click F6 to make back-right diagonal movement