|Buy from US
|Buy from UK
In this lesson, we will do a line-tracking auto-driving project. We will add a 5-Point tracking sensor module to the robotic car built in Lesson 1. The software in this lesson will read data from the 5-Point Tracking sensor module and automatically guide the smart car to move along the black track line in the white ground.
Lesson 1 must be completed before doing this line-tracking project.
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 5-point tracking sensor module x1
OSOYOO Battery box x1
OSOYOO 3pin female to female jumper wire x1
OSOYOO 6pin male to female jumper wire x2
OSOYOO 7pin female to female jumper wire x1
OSOYOO 2 pin XH.25 female to female x1
18650 Batteries(3.7V) x2
Battery charger x1
1)Please keep all lesson 1 connections same as it is.(Remember : DO NOT remove any existing wires installed in Lesson 1).
2)Connect GND-VCC pin of tracking sensor module to GND-5V of OSOYOO Uart Wi-Fi shield V1.3; connect IR1, IR2, IR3, IR4, IR5 pins to A4, A3, A2, A2, A1 with 7-pin 25 cm female to female cable as the following photo shows.
|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-lesson3.zip, unzip the download zip file mc-lesson3.zip, you will see a folder called mc-lesson3.zip.
Step 3: Connect Mega2560 board to PC with USB cable, Open Arduino IDE → click file → click Open → choose code “lesson3.ino” in lesson3 folder, load the code into Arduino.
Step 4: Choose corresponding board/port for your project, upload the sketch to the board.
Turn on the battery box and hold the car and adjust the potentiometer on the tracking sensor with a Philips screwdriver until you get the best sensitivity status: the signal indicates LED light will turn on when the sensor is above black track, and the signal LED will turn off when the sensor is above white ground.
Prepare a black track (the width of the black track is more than 20 mm and less than 30 mm) in white ground. Please note, the turning angle of the track can’t be too sharp, otherwise the car will move out of the track.
Turn on the car and put the middle of the tracking sensor module facing over the black track, and then the car will move along the black track.
DownLoad Url osoyoo.com