yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
MSPM0 Smart Robot Car📖
1.Quick Start Guide
  • 1. Assembly Videos
  • 2. Quick Start Videos
  • 3. Battery charging
  • 4. Notes
2.Introduction to the MSPM0 Car
  • 1.About MSPM0
  • 2.Development board interface description
3.Development environment setup and usage
  • 1.CCS Theia development
  • 2.MDK Arm development
  • 3.Uniflash burning
  • 4.External crystal oscillator configuration
  • 5.Project Migration
4.MSPM0 basic course
  • 1. LED light control (GPIO)
  • 2. Buzzer Control (GPIO)
  • 3. Button Control (EXTI)
  • 4. Serial Port (UART)
  • 5. Voltage Detection (ADC)
  • 6. Temperature Detection (ADC)
  • 7. Independent Watchdog (WWDG)
  • 8. Window Watchdog (WWDG)
  • 9. Timer (TIM)
  • 10. Breathing LED (PWM)
  • 11. I2C Communication (I2C)
  • 12. External Flash (SPI)
  • 13. Internal Flash (Flash)
  • 14. DMA
  • 15. FreeRTOS
5.Sensor basic course
  • 1.Servo control
  • 2.Ultrasonic servo PTZ basic use
  • 3.Motor PID control
  • 4.OLED display photosensitive value
  • 5.Infrared avoid sensor
  • 6.1 Infrared line tracking sensor-8 channel infrared tracking sensor module
  • 6.2 Infrared line tracking sensor-4 channel infrared tracking sensor module
  • 7.Infrared remote control
  • 8.Ultrasonic ranging
  • 9.RGB light drive
  • 10.MPU6050 raw data acquisition
  • 11.MPU6050 data fusion
  • 12.K210 vision recognition module
  • 13.K230 vision recognition module
6.Smart car course
  • 1.1 Car line tracking-8 channel infrared tracking sensor module
  • 1.2 Car line tracking-4 channel infrared tracking sensor module
  • 2.1 Drawing a circle-8 channel infrared tracking sensor module
  • 2.2 Drawing a circle-4 channel infrared tracking sensor module
  • 3.Ultrasonic following
  • 4.Ultrasonic avoid
  • 5.Ultrasonic avoid(Servo PTZ)
  • 6.Infrared sensor avoid
  • 7.Light following
  • 8.Gyroscope calibration straight-line walk
  • 9.Infrared remote control
  • 10.Autonomous driving car
7.Vision application course
  • 1.K210 autonomous driving
  • 2.K210 color tracking
  • 3.K210 handwritten digit action
  • 4.K210 color response
  • 5.K210 road sign indication action
  • 6.K210 following machine code
  • 7.K210 QR code command
  • 8.K230 vision line tracking
  • 9.K230 color tracking
  • 10.K230 machine code tracking
  • 11.K230 QR code command
  • 12.K230 autonomous avoid
  • 13.K230 license plate tracking
  • 14.K230 face tracking
  • 15.K230 gaze direction tracking
  • 16.K230 palm tracking
  • 17.K230 target tracking
  • 18.K230 human body tracking
  • 19.K230 OCR character recognition
8.Extended application course (Sold separately)
  • 1.Voice interaction module communication
  • 2.Voice interaction control
  • 3.K230 road sign indication action(Voice)
  • 4.K230 color response(Voice)
  • 5.K230 gesture control(Voice)
  • 6.K230 rock-paper-scissors(Voice)
  • 7.8-channel grayscale color line tracking
  • 8.Bluetooth remote control
  • 9.K210 Scenario-based autonomous driving
  • 10.K230 Scenario-based autonomous driving
Download
  • Code
  • SCH
  • 3D Model File
  • MSPM0 Data Sheet
  • Voice firmware
  • Hardware interface manual
Download ZIP

Welcome to MSPM0 Smart Robot Car repository

9.RGB light drive

RGB Light Drive

RGB Light Drive1. Software and Hardware2. Basic Principles2.1 Hardware Schematic2.2 Physical Connection Diagram2.3 Control Principle3. Project Configuration3.1 Description3.2 Pin Configuration4. Main Functions4.1 User Functions5. Experimental Phenomenon

This tutorial demonstrates: controlling the onboard RGB through buttons.

1. Software and Hardware

  • KEIL

  • MSPM0G3507 Development Board

  • Type-C data cable or DAP-Link

    For programming download or simulation to the development board

2. Basic Principles

2.1 Hardware Schematic

upscalemedia-transformed (30)

2.2 Physical Connection Diagram

image-20251011120558914

 

2.3 Control Principle

(Schematic Name)Control PinSpecific Meaning
RGBPB10Control data signal input pin

Chip Model: WS2812

Communication Protocol:

XGB-2812 is a single-wire transmission three-channel LED drive control chip that uses unipolar return-to-zero code data protocol. Each symbol must have a low level. Each symbol of this protocol starts with a high level, and the high-level time width determines "0" code or "1".

image-20230926100744845

SymbolParameterMin ValueTypical ValueMax ValueUnit
TSymbol period1200--ns
T0H0 code, high level time200300400ns
T0L0 code, low level time800900-ns
T1H1 code, high level time6509001000ns
T1L1 code, low level time200300-ns
TrstReset code, low level time200--us
  • When writing programs, the minimum symbol period requirement is 1.2us;
  • The high-level time of 0 code and 1 code must follow the specified range in the table above, and the low-level time of 0 code and 1 code must be less than 20us;

Protocol Data Format

Trst + 24bits data of first chip + 24bits data of second chip + ... + 24bits data of Nth chip + Trst

24bit grayscale data structure: high order first

G7G6G5G4G3G2G1G0R7R6R5R4R3R2R1R0B7B6B5B4B3B2B1B0
                        

Note: High order is sent first, data is sent in GRB order.

3. Project Configuration

3.1 Description

You can refer to the basic tutorial to complete the development environment setup.

3.2 Pin Configuration

image-20251030194424446

image-20251030194440307

image-20251030194511989

image-20251030194529590

4. Main Functions

Mainly introduces the functional code written by users. For detailed code, you can open the project files we provide and view the source code in the Bsp folder.

4.1 User Functions

Function: Ws2812b_WriteByte

Function Prototypevoid Ws2812b_WriteByte(unsigned char byte)
Function DescriptionWrite single byte data to WS2812
Input Parametersbyte: byte data to be written
Output ParametersNone

Function: rgb_SendArray

Function Prototypevoid rgb_SendArray(void)
Function DescriptionSend color light data
Input ParametersNone
Output ParametersNone

Function: BSP_Loop

Function Prototypevoid BSP_Loop(void)
Function DescriptionUse buttons to control onboard RGB light
Input ParametersNone
Output ParametersNone

Function: breathing_effect

Function Prototypevoid breathing_effect(uint8_t r, uint8_t g, uint8_t b)
Function DescriptionSet RGB breathing light
Input Parameter 1r: first parameter of rgb
Input Parameter 2g: second parameter of rgb
Input Parameter 3b: third parameter of rgb
Output ParametersNone

Function: BSP_Loop

Function Prototypevoid BSP_Loop(void)
Function DescriptionUse buttons to control onboard RGB light
Input ParametersNone
Output ParametersNone

Function: Key1_State

Function Prototypeuint8_t Key1_State(uint8_t mode)
Function DescriptionRead the state of button K1
Input Parametersmode: set mode, 0: returns 1 continuously when pressed; 1: returns 1 only once when pressed
Output ParametersReturns 1 when pressed, returns 0 when released.

5. Experimental Phenomenon

After downloading the program, the red light will be on. When key1 is pressed, the onboard RGB will switch between red light and off; when key2 is pressed, the onboard RGB will cycle through colors; when key3 is pressed, the onboard RGB will flash in breathing light mode.

508322d3821c4de3acf55648d1acfa54

 

Ultrasonic ranging
MPU6050 raw data acquisition

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/中文