yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
MicroROS Self-balancing Car📖
01.Introduction
  • 0.Unboxing and Reviewing
  • 1. Must read before use - learning route
  • 2. Introduction to LiDAR
  • 3. Balance car interface description
  • 4. Analysis of common problems
  • 5. Robot charging and battery precautions
02.Assembly tutorial
  • Robot assembly steps
03.Preparation
  • 0.Quick Start (Must Read)
  • 1.Write firmware
  • 2.How to install and use VM
  • 3.ESP32 communication board configuration parameters
  • 4.Connect to microROS agent
04.ROS-WiFi module configuration
  • 0.Serial port configuration WiFi instructions
  • 1.Use ROS-WiFi cam module(must read)
  • 2.Connect to ROS-WiFi cam module agent
  • 3.Camera image correction (optional)
05.Quick start control
  • 1.Keyboard remote control
  • 2.Handle remote control
06.ROS+OpenCV course
  • 1.OpenCV Getting started
  • 2.Geometric transformation
  • 3.Image processing and drawing text line segments
  • 4.Image beautification
07.Mediapipe course
  • 1. Hand detection
  • 2. Posture detection
  • 3. Overall inspection
  • 4. Face detection
  • 5. Face recognition
  • 6. Facial effects
  • 7. 3D object recognition
  • 8. Brush
  • 9. Finger control
  • 10. Gesture recognition
08.Robot basic course
  • 1.Robot information release
  • 2.Robot keyboard control
  • 3.Robot handle control
  • 4.Robot state estimation
  • 5.Line speed calibration
  • 6.Angular velocity calibration
  • 7.Robot URDF model
09.Lidar course
  • 1.Lidar avoid
  • 2.Lidar following
  • 3.Lidar guard
  • 5.Gmapping mapping
  • 6.Cartographer mapping
  • 7.Navigation2 navigation avoid
  • 8.Navigation2 fast relocation navigation
  • 9.ROS Robot APP mapping
  • 10.ROS Robot APP navigation
10.Robot visual interaction
  • 1.Color tracking
  • 2.Object recognition and tracking
  • 3.Face recognition tracking
  • 4.Autonomous driving line patrol
  • 5.QR code motion control
  • 6.Gesture control car movement
  • 7.Palm control car movement
  • 8.Gesture control car action group
  • 9.Palm recognition and tracking
  • 10.Human body posture recognition and tracking
11.Multi-machine course
  • 1.Multi-machine handle control
  • 2.Multi-machine keyboard control
  • 3.Multi-machine navigation
  • 4.Multi-machine rapid relocation navigation
12.STM32 balancing case
01.Environment construction and development
  • 13.Window Watchdog (WWDG)
  • 01.MDK-ARM installation
  • 02.STM32CubeIDE installation
  • 03.Common driver installation
  • 04.Download the program
  • 05.MDK-ARM project usage
  • 06.Program simulation
02.STM32 getting started course
  • 01.Project creation
  • 02.LED Control(GPIO)
  • 03.Buzzer control(GPIO)
  • 04.Button control(EXTI)
  • 05.Serial communication(USART)
  • 06.Voltage detection(ADC)
  • 07.Basic timer(TIM)
  • 08.Universal timer(TIM)
  • 09.Advanced Timer(TIM)
  • 10.I2C Communication(I2C)-OLED
  • 11.SPI communication(SPI)-2.4G handle
  • 12.Independent Watchdog (IWDG)
  • 14.DMA-USART
  • 15.DMA-I2C
03.STM32 expansion course
  • 01.Battery voltage detection (ADC)
  • 02.Ultrasonic module-measuring distance (TIM)
  • 03.Motor drive+encoder (TIM)
  • 04.OLED Data-Display(I2C)
  • 05.MPU6050-Data Read (I2C)
04.Robot car PID control course
  • 01.PID basic concept
  • 02.PID example analysis
  • 03.P, PI, PD controller theory
  • 04.Position PID
  • 05.Incremental PID
  • 06.Cascade PID
  • 07.Balance principle of car
  • 08.Car upright control (PD)
  • 09.Car speed ​​control (PI)
  • 10.Car steering control (PD)
  • 11.Got angle and angular velocity (DMP algorithm)
  • 12.Got angle and angular velocity (Kalman filter algorithm)
  • 13.Got angle and angular velocity(Complementary filter algorithm)
05.Robot car basic course
  • 01.Car parameter adjustment
  • 02.Ultrasonic obstacle avoidance
  • 03.Ultrasonic follow
  • 04.Bluetooth remote control
  • 05.Load balance
  • 06.Radar obstacle avoidance
  • 07.Radar guard
  • 08.Radar follow
  • 09.Radar patrol
  • 10.Radar wall following go in a straight line
  • 11.Radar tracking wall multiple walls
06.Robot car LQR control
  • Balance car LQR high-level control
07.Circuit design
  • 01.Overall circuit design
  • 02.STM32 minimum system
  • 03.Serial port circuit design
  • 04.Power circuit design
  • 05.MPU6050 Circuit Design
  • 06.Motor drive circuit design
08.Mathematical model
  • Balance car mathematical model
13.Linux basic course
  • 1.Introduction to Linux system
  • 2.Ubuntu file system
  • 3.Ubuntu common commands
  • 4.Ubuntu common editors
  • 5.Ubuntu software operation commands
  • 6.Virtual machine installation
  • 7.SSH remote control
  • 8.VNC remote control
  • 9.Transfer files remotely
  • 10.Driver library and communication
  • 11.Static IP and hotspot mode
  • 12.Bind device ID
  • 13.Capacity expansion and resource allocation
  • 14.Update system software sources
  • 15.Set root user password
  • 16.sudo free password
  • 17.Connect to WiFi network
  • 18.View system version
  • 19.Customized service management
  • 20.Back up system image
14.Docker course
  • 1. Overview and installation
  • 2. Common commands
  • 3. Docker images deeply understand and publish images
  • 4. Docker hardware interaction and data processing
  • 5. Enter the bot's docker container
15.ROS2 basic course
  • 1.Introduction to ROS2
  • 2.ROS2 install Humble
  • 3.ROS2 development environment
  • 4.ROS2 workspace
  • 5.ROS2 function package
  • 6.ROS2 node
  • 7.ROS2 topic communication
  • 8.ROS2 service communication
  • 9.ROS2 action communication
  • 10.ROS2 custom interface message
  • 11.ROS2 parameter service case
  • 12.ROS2 meta-function package
  • 13.ROS2 distributed communication
  • 14.ROS2 DDS
  • 15.ROS2 time related API
  • 16.ROS2 common command tools
  • 17.ROS2 rviz2 use
  • 18.ROS2 rqt toolbox
  • 19.ROS2 Launch startup file configuration
  • 20.ROS2 recording and playback tool
  • 21.ROS2 URDF model
  • 22.ROS2 Gazebo simulation platform
  • 23.ROS2 TF2 coordinate transformation
Download
  • RemoteCtrl_APP(Android)
  • Mapping_APP(iOS_Android)
  • Code
  • Hardware Information
  • software tools
  • 3D model file
  • Instruction manual
  • VM image file
  • ROS2_Basic_VM
Download ZIP

Welcome to MicroROS Self-balancing Car repository

01.Project creation

Project creation

Project creationProject directoryFolder frameworkCMSISFWLibUSERBSPOBJConfigure the projectCreate a new projectChip selectionProject file managementProject target optionsTargetOutputC/C++Compile the projectTemplate.hex

The tutorial demonstrates how to create a new STM32F103RCT6 standard library project.

Project directory

Before using MDK-ARM to create a new project, we need to operate the folders under the project: the operation includes creating a new folder and copying the official standard library firmware package file to the specified folder.

Folder framework

Create a new folder according to the following directory:

  • Template: Project name

  • CMSIS: Kernel driver and startup file

  • FWLib: Standard library function source code file

  • USER: Project file and user file

  • BSP: Development board peripheral driver file

  • OBJ: Compile and generate file

image-20240722144718505

CMSIS

  • core_cm3.c

  • core_cm3.h

  • stm32f10x.h

  • system_stm32f10x.c

  • system_stm32f10x.h

  • startup_stm32f10x_hd.s: can be used with STM32F103RCT6

  • startup_stm32f10x_md.s: can be used with STM32F103C8T6

Note: startup_stm32f10x_hd.s and startup_stm32f10x_md.s cannot be imported into the project directory at the same time, otherwise an error will be reported!

xxxxxxxxxx
The kernel driver and startup files correspond to the path of the STM32 standard firmware library (STM32F10x_StdPeriph_Lib_V3.6.0):
STM32F10x_StdPeriph_Lib_V3.6.0\Libraries\CMSIS\CM3\CoreSupport
STM32F10x_StdPeriph_Lib_V3.6.0\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x
STM32F10x_StdPeriph_Lib_V3.6.0.zip\STM32F10x_StdPeriph_Lib_V3.6.0\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm

image-20240722155524109

FWLib

  • inc

    • misc.h

    • stm32f10x_adc.h

    • stm32f10x_bkp.h

    • stm32f10x_can.h

    • stm32f10x_cec.h

    • stm32f10x_crc.h

    • stm32f10x_dac.h

    • stm32f10x_dbgmcu.h

    • stm32f10x_dma.h

    • stm32f10x_exti.h

    • stm32f10x_flash.h

    • stm32f10x_fsmc.h

    • stm32f10x_gpio.h

    • stm32f10x_i2c.h

    • stm32f10x_iwdg.h

    • stm32f10x_pwr.h

    • stm32f10x_rcc.h

    • stm32f10x_rtc.h

    • stm32f10x_sdio.h

    • stm32f10x_spi.h

    • stm32f10x_tim.h

    • stm32f10x_usart.h

    • stm32f10x_wwdg.h

  • src

    • misc.c

    • stm32f10x_adc.c

    • stm32f10x_bkp.c

    • stm32f10x_can.c

    • stm32f10x_cec.c

    • stm32f10x_crc.c

    • stm32f10x_dac.c

    • stm32f10x_dbgmcu.c

    • stm32f10x_dma.c

    • stm32f10x_exti.c

    • stm32f10x_flash.c

    • stm32f10x_fsmc.c

    • stm32f10x_gpio.c

    • stm32f10x_i2c.c

    • stm32f10x_iwdg.c

    • stm32f10x_pwr.c

    • stm32f10x_rcc.c

    • stm32f10x_rtc.c

    • stm32f10x_sdio.c

    • stm32f10x_spi.c

    • stm32f10x_tim.c

    • stm32f10x_usart.c

    • stm32f10x_wwdg.c

xxxxxxxxxx
The path of the standard library function source code file corresponding to the STM32 standard firmware library (STM32F10x_StdPeriph_Lib_V3.6.0):
STM32F10x_StdPeriph_Lib_V3.6.0\Libraries\STM32F10x_StdPeriph_Driver\inc
STM32F10x_StdPeriph_Lib_V3.6.0\Libraries\STM32F10x_StdPeriph_Driver\src

image-20240722152410912

USER

新建工程时,会将工程放在该目录下。

  • main.c

  • stm32f10x_conf.h

  • stm32f10x_it.c

  • stm32f10x_it.h

xxxxxxxxxx
The path of the user file corresponding to the STM32 standard firmware library (STM32F10x_StdPeriph_Lib_V3.6.0):
STM32F10x_StdPeriph_Lib_V3.6.0\Project\STM32F10x_StdPeriph_Template

BSP

When creating a new project, store the peripheral driver files of the development board

OBJ

When creating a new project, store the compiled files

Configure the project

Create a new project

Double-click to open the Keil uVision5 software on the desktop

image-20240722153340917

New project: Select the newly created USER folder as the project path, and you can define the project file name yourself

image-20240722154024169

image-20240722154226355

Chip selection

Search in the chip search bar: STM32F103RC

xxxxxxxxxx
If you don’t have a chip, you can install the STM32F1 series firmware package yourself

image-20240722154416506

image-20240722154835425

Project file management

It is recommended to add according to the project folder framework

②: Modify according to the project name

③: Modify according to the subfolder name

④: Add the .c and .s files in the corresponding folder

​x
Note:

1. Only one startup file can be added. We use STM32F103RCT6 here, so import the startup_stm32f10x_hd.s file

2. Since the main.c file is copied from the STM32 standard firmware library, we need to delete the content inside and fill in the following content

Click OK and it will be like the directory on the left of the picture. Users can compare it by themselves!

image-20240722160226079

Project target options

Target

Select the AC5 compiler

image-20240722170754591

Output

Check the option Create HEX File

image-20240722170209086

Select the location to store the compiled files: Template\OBJ

image-20240722171108194

C/C++

Define: add USE_STDPERIPH_DRIVER

image-20240722170330819

Include Paths: Add all folder paths containing .h files in the project

image-20240722170440663

xxxxxxxxxx
If you are not sure which folders need to be added, you can add all the folder paths under this project.

Compile the project

Click rebuild to compile the project:

image-20240722171223845

If "0 Error(s), 0 Warning(s) appears, it means the project template is created successfully!

Template.hex

Template.hex is the file generated after the project is compiled. You can use the serial port burning program to burn this file into the development board and run it!

Template.hex is generated in: Template\OBJ
Program simulation
LED Control(GPIO)

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