yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
8-Channel Tracking Module📖
0. 8-channel line tracking module usage
  • 8-channel line tracking module usage
1. Single board tutorials
1.arduino
  • I2C method
  • IO method
  • Serial port method
2.STM32
  • I2C method
  • IO method
  • Serial Port method
3.MSPM0G3507
  • I2C method
  • IO method
  • Serial Port method
4.MSPM0G3519
  • I2Cnew
  • IOnew
  • Serial Portnew
5.Raspberry Pi
  • I2C method
  • IO method
  • Serial Port method
2. Car Tutorials
  • 1.STM32-Wheeled car chassis_V1
  • 2.STM32-Wheeled car chassis_V2
  • 3.STM32 development board car
  • 4.STM32 self-balancing car
  • 5.MSPM0-Wheeled car chassis_V1
  • 6.MSPM0G3507-Wheeled car chassis_V2
  • 7.MSPM0G3519-Wheeled car chassis_V2new
  • 8.Arduino car(Roboduino)
  • 9.Raspberry Pi car(RaspbotV2)
3. Expansion Tutorialsnew
  • 1.Autonomous driving car
  • 2.Vehicle-mounted balance ball motion control system
Download
  • Code
  • Protocol
  • 3D Model File
Download ZIP

Welcome to 8-Channel Tracking Module repository

8.Arduino car(Roboduino)

Roboduino car patrol line

Roboduino car patrol line1. Experimental preparation2. Car wiring2.1 Wiring of Roboduino and infrared sensor (this example uses I2C communication)Main proceduresExperimental phenomenon:

1. Experimental preparation

  1. Knowledge reserve

  • Good programming ability (mainly C language)

  1. Material preparation

  • Roboduino car *1

  • Eight-way tracking module *1

  • 7.4V battery *1

  • Several Dupont wires

  • Several M3 copper pillars and M3 screws

2. Car wiring

After assembling the car, it is as shown below

image-2024110100001

2.1 Wiring of Roboduino and infrared sensor (this example uses I2C communication)

RoboduinoInfrared sensor
SDASDA
SCLSCL
5V5V
GNDGND

 

Main procedures

​x
void setup()
{
    init_x_PID(); //PID Initialization
    Serial.begin(115200);  // start serial for output
    Wire.begin();        // join i2c bus (address optional for master)

    pinMode(KEY_PIN, INPUT_PULLUP);  // Set the key(button) pin to pull-up input mode
    delay(100);

    while (getKeyState(KEY_PIN) != Press_KEY) ;//Press key1 to start line patrol

    Motor_init();//Motor initialization

}


void loop() 
{
  I2Cdata();
  Car_line_track();

}

The main function is to perform PID processing for line patrol according to the value of the infrared probe, so that line patrol can be completed on the map with black lines and white background.

In line_pid.cpp, there is a parameter for adjusting PID line patrol. If you want to increase or decrease the speed and optimize the effect, you can adjust the macro definition value inside.

xxxxxxxxxx

#define KPx  (15) //P
#define KIx  (0.0001) //I
#define KDx  (1) //D

#define Speed_Line (30) //Line patrol speed
  • KPx: P value of pid line patrol

  • KIx

  • KDx

  • Speed_Line: Speed of line patrol

 

Experimental phenomenon:

On the premise of ensuring that the wiring and installation are correct, after the 8-way line patrol module is calibrated, press the key button on the car to start line patrol. ​ If the 8-way module probe cannot detect the black and white lines normally, you need to wait for the module to work normally before pressing the key button on the car

MSPM0G3519-Wheeled car chassis_V2
Raspberry Pi car(RaspbotV2)

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文