6.STM32 platform-------Color LED
1) Preparation
1-1 STM32 expansion board
1-2 STM32 smart car
1-3 Color RGB module
2)Purpose of Experimental
In this lesson, we mainly to learn how to control GPIO port of STM32. When the car is powered on, press the start button next to the PS2 mark. We will see that colorful lights are flashing.
3)Principle of experimental
The RGB light is packaged with three LEDs (red, green, and blue). Different colors (256*256*256) can be mixed by controlling the brightness of the three LEDs (256 brightness levels are optional).
As can be seen from the circuit schematic diagram, the RGB light is a common cathode LED, one pin is grounded, and the remaining three RGB pins are respectively connected to the PA1, PA6, and PA7 pins on the STM32 main control board. Each LED lamp needs to be connected in series with a 220Ωresistor as the current limiting resistor. We only need to control the corresponding pin to be high level on the STM32 main control board to illuminate the corresponding LED.
2) Experimental Steps
4-1 About the schematic
4-1 STM32 main control board circuit diagram
4-2 RGB module interface
4-2 According to the circuit schematic:
LED_R-----PA1(STM32)
LED_G-----PA7(STM32)
LED_B-----PA6(STM32)
4-3 About the code
Please see the folder named Color LED in the code folder.
The code of the experiment: 6.Color LED.rar
STM32 Visual Tracking Car Tutorial Overview
2.Development environment
- 2.1 Keil uVision5 install tutorial
- 2.2 Keil uVision5 create a new project tutorial
- 2.3 How to download code
3.Experimental tutorial
- STM32 Visual Tracking Car Tutorial 3.1 Light up LED
- STM32 Visual Tracking Car Tutorial 3.2 Advance
- STM32 Visual Tracking Car Tutorial 3.3 Servo control
- STM32 Visual Tracking Car Tutorial 3.4 OLED
- STM32 Visual Tracking Car Tutorial 3.5 Battery voltage detection
- STM32 Visual Tracking Car Tutorial 3.6 Color LED
- STM32 Visual Tracking Car Tutorial 3.7 Ultrasonic obstacle avoidance
- STM32 Visual Tracking Car Tutorial 3.8 Screen display font
- STM32 Visual Tracking Car Tutorial 3.9 Camera vision tracking
- STM32 Visual Tracking Car Tutorial 3.10 PS2 control car
- STM32 Visual Tracking Car Tutorial 3.11 Bluetooth control car
4. About battery
5. About installation
Download
Buy the STM32 Visual tracking robot car