II.Parts and Devices
III.Hardware Installation
IV.Software Installation
VI.How to play

Buy from US Buy from UK Besorgen DE Acquistare IT Acheter FR Comprar ES ここでご購入を!

In this lesson, we will use a mobile APP to control our robot car and make an imitation driving. Since it is a mock driving, we will use a virtual steering wheel and gear in our APP to imitate their counterparts in the real car.

OSOYOO Mecanum wheels robotic car chassis x1
OSOYOO Wheels and motors x4 (left-wheels x2/right-wheels x2)
OSOYOO Mega2560 board, fully compatible with Arduino UNO/Mega2560 x1
OSOYOO Uart Wi-Fi shield x1
OSOYOO Model Y driver board x1
OSOYOO Voltage meter x1
OSOYOO Bluetooth modules x1
OSOYOO Battery box x1
OSOYOO 3pin female to female jumper wire x1
OSOYOO 6pin male to female jumper wire x2
OSOYOO 10pin male to female jumper wire x1
OSOYOO 2 pin XH.25 female to female x1
18650 Batteries(3.7V) x2
Battery charger x1

Step 1: You must complete lesson 1 (assembling the car) before you continue on with this lesson.

Step 2: Connect Bluetooth TX/RX ports to D19,D18 with jumper wires.
(Note: You need to 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.)

Step 3: Bluetooth Module should be inserted into Bluetooth 6-pin slot in OSOYOO Wi-Fi Board.

Step 4: Mobile APP:
Go to your Google Play or Apple APP store and search APP name “OSOYOO imitation driving”, Download the APP as following and install it in your smartphone.

Open-source Arduino
Download Arduino IDE here:
7 zip is a free zip
utility that unzips zip files
Download 7zip here for free

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.

Step 2: Download https://osoyoo.com/driver/mecanum_acrylic_chassis_v2/mc-lesson5.zip, unzip the download zip file mc-lesson5.zip, you will see a folder called mc-lesson5.zip.

Step 3: Connect Mega2560 board to PC with USB cable, Open Arduino IDE → click file → click Open → choose code “lesson5.ino” in lesson5 folder, load the code into Arduino.

Step 4: Choose corresponding board/port for your project, upload the sketch to the board.

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 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.

Step 5) click Gear button to change gear to Forward or Backward direction.

Step 6) press F1 to Shift to left way, F5 to shift to right way, F2 to up left diagonal, F4 to up right diagonal, F3 to pause.

Motor Speed Tuning for better performance

To get better running performance result, motor power (speed) value should be adjusted properly as per battery level. If motor power (speed) value is too high, your car might run too fast and easy to out of control. If motor power (speed) is too low, the car might not even move.

To adjust the motor power value, you need to change the 3 constants line 27,28,29 in mecanum-2560-lesson4.ino sketch file:

#define MIN_SPEED  50
#define TURN_SPEED  70
#define SLOW_TURN_SPEED  50
#define BACK_SPEED 60

MIN_SPEED is the minimum power required to start the car. If when APP engine toggle is switched to RED, but your car does not move, you need to increase this value, if the car runs too fast at engine start moment, you need to reduce this value.

TURN_SPEED AND, SLOW_TURN_SPEED value determines the turning speed of your car. If your car turning too fast, you need to reduce these two values, if turning too slow or not turning, increase these two values. Always make SLOW_TURN_SPEED about 20 to 30 lower than TURN_SPEED value.

BACK_SPEED value determines the reverse back running speed.

After batteries are running low, you might need to increase the value of these 3 constants. You can gradually add or reduce 10 each time on these values and compare which values have best tracking performance.