I.Objective
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 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)
Raspberry pi 4/5 board
OSOYOO PWM HAT 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 female 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 ; 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.
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.
Run following command:
wget https://osoyoo.com/driver/mecanum/linetracking.py python linetracking.py
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