Home > other >  STTM32F103 series single-chip computer how to implement the LED flashing 5 times then keep normally
STTM32F103 series single-chip computer how to implement the LED flashing 5 times then keep normally

Time:11-20

STTM32F103 series single-chip computer how to implement the LED flashing 5 times then keep normally on?

CodePudding user response:

Already contains answers to the questions you asked,
First you have to control LED lights, then you have to do is the LED light - & gt; Delay - & gt; LED out
This cycle 5 times, and then make the LED light is ok

CodePudding user response:

Configured LED IO mouth first, and then use a five cycle (LEDON, delay time, LEDOFF, delay when appropriate); Enter another infinite loop (LEDON);

CodePudding user response:

Use STM32CUBE, HAL library, 10 minutes to complete!

CodePudding user response:

Destroy destroy the light of logic is simple light then normally on 5 times as 1/f, say you yourself have said implementation of the approach

CodePudding user response:

The program is very simple:

# define LED P1.0
Unsigned char I;
for(i=0; i<5; I++)
{
delay_ms(500);//500 milliseconds delay
LED=1;//the LED light
delay_ms(500);//500 milliseconds delay
LED=0;//the LED out
}
LED=1;//the LED normally on

CodePudding user response:

To learn,,,

CodePudding user response:

?????
The question is a science,

CodePudding user response:

A timer and a counter, non-blocking way

CodePudding user response:

Enter the normally on after using a For loop, five times

CodePudding user response:

Configuration first clock and serial port, and then write a delay procedures,
Define a variable is used to count
Count to five times, make the pin has been in a high level or low level,
  • Related