5% OFF Over $19, Code: Elephant5; 10% OFF Over $59, Code: Elephant10



STM32 Visual Tracking Car Tutorial 3.6 Color LED

Posted by Fiona Su on

6.STM32 platform-------Color LED

1) Preparation

image.png 

1-1  STM32 expansion board

image.png 

1-2 STM32 smart car

 image.png 

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

image.png 

4-1 STM32 main control board circuit diagram

image.png 

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

3.Experimental tutorial

4. About battery

5. About installation

Download

Buy the STM32 Visual tracking robot car

 

0 comments

Leave a comment

Please note, comments must be approved before they are published