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

IO method

Raspberry Pi - IO method

Raspberry Pi - IO methodExperimental preparationExperimental purposeExperimental wiringExperimental steps and phenomenaExperimental source code

Experimental preparation

  1. Raspberry Pi motherboard

  2. 8-channel line patrol module

  3. Several Dupont cables

The Raspberry Pi board needs to download the IO communication source code provided in the document

Experimental purpose

The content of this experiment is mainly to use the Raspberry Pi main control to receive the data of the 8-channel line patrol module through IO.

Experimental wiring

Raspberry Pi8-channel line patrol module
GPIO.21x1
GPIO.22x2
GPIO.23x3
GPIO.24x4
GPIO.25x5
GPIO.27x6
GPIO.28x7
GPIO.29x8
5V5V
GNDGND

image-2024110100003

image-2024110100004

As shown in the figure: image-2024110100001

 

Experimental steps and phenomena

  1. After connecting the wires, do not power on for wiring, power off for wiring Run the script

python3 IR_IO.py

image-2024110100002

 

Experimental source code

xxxxxxxxxx
try:
    while True:
        # Read pin level
        pin_state_x1 = GPIO.input(x1)
        pin_state_x2 = GPIO.input(x2)
        pin_state_x3 = GPIO.input(x3)
        pin_state_x4 = GPIO.input(x4)
        pin_state_x5 = GPIO.input(x5)
        pin_state_x6 = GPIO.input(x6)
        pin_state_x7 = GPIO.input(x7)
        pin_state_x8 = GPIO.input(x8)
        
        print("x1:"+str(pin_state_x1)+"  x2:"+str(pin_state_x2)+"  x3:"+str(pin_state_x3)+"  x4:"+str(pin_state_x4)+"  x5:"+str(pin_state_x5)+"  x6:"+str(pin_state_x6)+"  x7:"+str(pin_state_x7)+"  x8:"+str(pin_state_x8)) 
        # Wait for a while
        time.sleep(1)
finally:
    # Clean up GPIO settings
    GPIO.cleanup()

The main function of the source code is very simple. It reads the probe pins of 8 patrol lines through IO and prints them out.

 

 

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