yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
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
5.Raspberry Pi
  • I2C method
  • IO method
  • Serial Port method
4.MSPM0G3519
  • I2Cnew
  • IOnew
  • Serial Portnew
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
Download ZIP

Welcome to 8-Channel Tracking Module repository

Serial port method

arduino-Serial port method

arduino-Serial port methodExperimental preparationExperimental purposeExperimental wiringExperimental steps and phenomenaExperimental source code

Experimental preparation

  1. Arduino mainboard

  2. 8-channel line patrol module

  3. Several Dupont cables

The Arduino board needs to download the serial communication source code provided in the document

Experimental purpose

The content of this experiment is mainly to use the Arduino master to receive the data of the 8-way line patrol module through the serial port.

Experimental wiring

Adruino connected to the serial port assistant can be directly connected using the program download port

adruino8-channel line patrol module
2TX
3RX
5V5V
GNDGND

As shown in the figure: image-2024110100001

Experimental steps and phenomena

  1. After connecting the wires, open the serial port assistant and you can see the numerical data of the infrared module. Set the baud rate to 115200. As shown below:

image-2024110100002

 

Experimental source code

​x

extern uint8_t g_new_package_flag ;
void setup()
{
    serial_init();//Serial port initialization
    //Waiting for the module to be normal
    SET_Eight_Mode(0,0,1);//Set to receive only numeric data


}


void loop() 
{
  //Mainly handle serial port interrupt
  recv_data(); //take over
  if(g_new_package_flag ==1)
  {
    g_new_package_flag = 0; 
    Deal_Usart_Data();//Data analysis numerical type
   }
}

SET_Eight_Mode(0,0,1);:The first parameter of this function is the calibration mode (0: exit calibration mode 1: enter calibration mode) The second parameter is whether to receive analog data The third parameter is whether to receive numerical data. This routine only provides parsing of numerical data. If you need to parse analog data, you can parse it yourself according to the protocol. The serial port parsing file of this project also has a function for parsing analog values. You can refer to it and call the Deal_Usart_AData function.

 

IO method
I2C method

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
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文