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

I2C method

MSPM0-IO Method

MSPM0-IO MethodExperimental preparationExperimental purposeExperimental wiringExperimental steps and phenomenaExperimental source code

Experimental preparation

  1. TI's MSPM0G3507 motherboard

  2. 8-channel patrol module

  3. Several Dupont cables

MSPM0G3507 board needs to download the I2C communication source code provided in the document**

Experimental purpose

The content of this experiment is mainly to use the MSPM0G3507 master control to receive the data of the 8-channel patrol module through I2C.

Experimental wiring

MSPM0G3507 connected to the serial port assistant If the type-c port of the msp does not have the function of downloading programs, you need to use a USB to TTL module to connect to the computer. The wiring is described in the following table

MSPM0G3507usb to ttl
PA10TX
PA11RX
vccvcc
GNDGND
If the MSPM0G3507 MCU type has a download function, you can directly use the type-c to connect to the computer's serial port assistant 
MSPM0G35078-channel line patrol module
PA0SDA
PA1SCL
5v5v
GNDGND

 

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 in the figure below

image-2024110100002

MSPM0 developers need to build the environment before compiling and running the project Environment building tutorial: https://wiki.lckfb.com/zh-hans/dmx/beginner/install.html

Experimental source code

​x
//Main function
int main(void)
{
    SYSCFG_DL_init();
    
    
        //Wait for the infrared module to be normal 
        delay_ms(1000);
        delay_ms(1000);

    
     //Clear the serial port interrupt flag
    NVIC_ClearPendingIRQ(MYUART_INST_INT_IRQN);
    //Enable serial port interrupt
    NVIC_EnableIRQ(MYUART_INST_INT_IRQN);

        printf("start\r\n");
    
        
        IRI2C_WriteByte(0x01,1);//Control access calibration
        delay_ms(200);  
        IRI2C_WriteByte(0x01,0);//Control exit calibration
        delay_ms(200);  
    
        printf("okok\r\n");
    
    while (1) 
    {    
            
        printf_i2c_data();
        delay_ms(500);  
                      
    }
} 

Before powering on, press and hold the reset pin of mspM0, wait for the infrared module to work normally, and then release the reset button of MSP, otherwise it is easy to cause i2c deadlock. The main function of the source code is very simple, reading the probe pins of 8-way patrol line and printing them out.

 

 

Serial Port method
IO 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/中文