yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
Self-balancing Robot Car📖
00.Get started quickly
  • 01.Balance car manual
  • 02.Balancing car assembly
  • 03.Get started quickly
  • 04.Balance car interface description
  • 05.Common Problem Analysis
  • 06.Balance Car V2 Library Function Development Manual
01.Environment development
  • 01.MDK-ARM installation
  • 02.STM32CubeIDE installation
  • 03.Common driver installation
  • 04.Download the program
  • 05.MDK-ARM project usage
  • 06.Program simulation
  • 07. VSCode Installation
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)
  • 13.Window Watchdog (WWDG)
  • 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)
  • 06.Bluetooth module-Data reading (USART)
  • 07.2.4G handle-Data reading (SPI)
  • 08.Tracking module-Read status (GPIO)
  • 09.CCD module-Reading data (ADC)
  • 10.Electromagnetic module-Reading data (ADC)
  • 11.K210 module-Serial communication (USART)
  • 12.Tmini-Plus lidar-Reading data (USART)
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.Robot car advanced course
  • 01.4-channel tracking
  • 02.4-channel tracking avoid
  • 03.2.4G handle control
  • 04.CCD tracking
  • 05.CCD tracking avoid
  • 06.Electromagnetic tracking
  • 07.K210-QR code recognition
  • 08.K210-Color line tracking
  • 09.K210-Color follow
  • 10.K210-Self learning
  • 11.K210-Number recognition
  • 12.Lidar avoid
  • 13.Lidar guard
  • 14.Lidar follow
  • 15.Lidar patrol
  • 16.Lidar wall tracking-straight line
  • 17.Lidar wall tracking-multiple walls
  • 18. DIY Automatic driving car
07.Robot car LQR control
  • Robot car LQR control
08.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
09.Mathematical model
  • Mathematical model
10.Expand course
  • Autonomous Driving
Download
  • APP(Android)
  • Codes
  • Hardware-Info
  • SCH
  • Software Tools
  • STM32_Chip_DataSheet
  • 3D_Model_File
  • Video_PPT
Download ZIP

Welcome to Self-balancing Robot Car repository

02.STM32CubeIDE installation

STM32CubeIDE installation

STM32CubeIDE installation1. Software Download1、Software download2. Select the platform3. Fill in the information2. Software installation1. Open the installation package2. Installation process-settings3. Software Configuration1. Open the application2. Register-Login account3. Install the firmware package4. Software Usage1. Create a new project2. Chip selection3. Project settings4. Pin layout and configuration SYS - RCC 5. Clock configuration6. Project management7. Generate initialization code8. Write code9. Compile code10. Create a new project again5. Common ProblemsEncoding format problem

STM32CubeIDE is a free software, the tutorial demonstrates the installation and use of the software!

The [Attachment → Software Tools] in the document provides an installation package, you can skip the download step and install it directly

1. Software Download

1、Software download

ST office website:https://www.st.com/content/st_com/en/stm32cubeide.html

image-20240830120606898

2. Select the platform

  • Platform: Windows

image-20240830120624603

3. Fill in the information

  • Agree to the agreement

image-20240830120653420

  • Fill in the information

image-20240830120708472

xxxxxxxxxx
The email address needs to be filled in accurately, and the software download link will be sent to you via email
  • Submission completed

image-20240830120725782

  • Download the installation package via email

image-20230921173555796

​x
Click the link to jump to the official website, and the website will automatically pop up a pop-up window for downloading the software compressed package

2. Software installation

1. Open the installation package

  • Administrator

Open the installation package as an administrator

image-20240821172641461

xxxxxxxxxx
If you open the software installation package and see "NSIS ERROR: error "Launching installer" error message:
Please put the installation package in a path without Chinese characters

2. Installation process-settings

  • Next

image-20230921174734406

  • Agree to the agreement → I agree

image-20230921174827723

  • Installation location → Next → Install

xxxxxxxxxx
It is recommended to use the default installation location of the software and the path should not contain Chinese characters

image-20230921175019951

image-20230921175121934

xxxxxxxxxx
Check the option to install ST-Link and J-Link drivers
  • Install driver

image-20230921175245637

  • Installation waiting → Next

image-20230921175518924

  • Finish

image-20230921175801203

3. Software Configuration

Be familiar with the software-related options and functions.

1. Open the application

  • Left mouse button: Double-click the desktop application

image-20230921175945830

  • Select workspace

image-20240821173105251

xxxxxxxxxx
You can create a new folder yourself, and the folder path cannot contain Chinese characters

image-20240821173159091

2. Register-Login account

The new version of STM32CubeIDE requires a registered account to log in before downloading the firmware package and using the software normally:

image-20230921180902783

3. Install the firmware package

  • Help → Manage embedded software packages

image-20230921181435546

  • Install the latest firmware package of the STM32F1 series

image-20230921181947516

xxxxxxxxxx
1. The chip firmware package cannot be installed without logging in
2. To install or uninstall, select the box in front of the chip firmware package. Clicking this option will not have installation and uninstall options
  • Waiting for download

image-20230921182157454

  • Close the interface

image-20230921182233264

4. Software Usage

STM32CubeIDE integrates the STM32CubeMX function, which can be used for pin configuration, as well as direct code writing and debugging.

1. Create a new project

image-20230921183202024

2. Chip selection

  • Chip selection and interface

Search for STM32F103RCT6

image-20240821174213278

3. Project settings

image-20240821174336509

xxxxxxxxxx
Default configuration is sufficient, and the project file name can be customized

image-20240821174411429

image-20240821174433911

image-20240821174459660

4. Pin layout and configuration

image-20240821174550492 SYS image-20240821174645467 - RCC image-20240821174727982 5. Clock configuration

image-20240821174908961

xxxxxxxxxx
Refer to the options involved in the red line

6. Project management

  • Project: Project

image-20240821175051963

xxxxxxxxxx
Using STM32CubeIDE, IDE projects cannot be exported (such as exporting MDK-ARM project files). If you need to export other IDE projects, switch to STM32CubeMX operation!
  • Code Generator: Code Generation

image-20240821175127807

  • Advance Settings: Advanced Settings

image-20240821175211984

xxxxxxxxxx
Select the library used for the initialization code: HAL library is demonstrated here

7. Generate initialization code

Click the code generation or save button to generate initialization code

image-20240821175257208

xxxxxxxxxx
Using the Ctrl+S shortcut key to save will also generate initialization code

image-20240821175400772

8. Write code

User code must be located between USER CODE BEGIN and USER CODE END, otherwise the next time you use the STM32CubeMX peripheral configuration function, the code outside this position will be deleted.

xxxxxxxxxx
Other positions also need to be written in the area between *** BEGIN and *** END!

image-20240821175655872

9. Compile code

image-20240821180145746

10. Create a new project again

Demonstrates how to create a new project in a project file. This method is often used in actual development to create a new project

image-20240821175924311

For the following operations, please refer to the previous steps.

xxxxxxxxxx
The newly added project will be displayed in the workspace on the left

5. Common Problems

Encoding format problem

Tip: Project '***' has no explicit encoding set

Solution: Right-click the project name → Modify file encoding format → UTF-8

image-20240821180224199

image-20240821180307633

MDK-ARM installation
Common driver installation

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