We add 5 channel black/white tracking sensor module to the framework from basic robot car. The software will read data from these 5 channel black/white tracking sensor module and automatically guide the smart car to move along the black track line in the white ground.
Hardware Installation:Step 1: please complete installation of basic robot car according to the link https://osoyoo.com/?p=32224
Step 2: Install tracking sensor modules under lower car chassis with 2pcs M3 plastic screws, M3 plastic pillars and M3 plastic nuts.
Step 3: 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 A0, A1, A2, A3, A4 with 7pin 25 cm female to female cable as the following photo shows (Remember : DO NOT remove any existing wires installed in Lesson 1) :
Step 1: Install latest IDE. Download IDE from https://www.arduino.cc/en/Main/Software?setlang=en, then install the software.
Step 2: Download line tracking robot car sample code from v2smartcar-lesson4, unzip the download zip file smartcar-lesson4.zip, you will see a folder called smartcar-lesson4B.
Step 3: Connect OSOYOO basic board to PC with USB cable, Open IDE -> click file -> click Open -> choose code “smartcar-lesson4.ino” in smartcar-lesson4 folder, load the code into your board.
Step 4: Choose corresponding board/port for your project, upload the sketch to the board.
Step 5: Adjust the sensitivity of tracking sensor modules. Turn on and hold the car and adjust the potentiometer on the tracking sensor with 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 bend angle of track can’t be larger than 90 degree. If the angle is too large, 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.
Comments
Please log in or sign up to comment.