STM32-Nucleo - Keil 5 IDE with CubeMX: Tutorial 2 - Push button

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

If you have an external push button, you add a resistor in series and a capacitor to refV (0V) to it, called "low pass filter", and you are done with the debouncing.

asagk
Автор

For toggling the pin you can also use this kind of Approach


//This toogle initialization means wether the led wil be on or off for the first press
bool toggle = true;


if(HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_13) == GPIO_PIN_RESET)
{
toggle = !toggle;


//This delay here because the frequency of the board is so high so you need time to release your finger.
//Else you wouldn't be able to see any change of the led
HAL_Delay(100);


HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, toggle);
}

dragosmakovei
Автор

Thank you very much for the great tutorial.
Small note: I believe there is no need for the "debouncing code" since the push button in the nucleo f401re board is attached to a pullup resistor (4K7) and 100nF capacitor.
Keep up the good work (Y)

halradhi
Автор

Sir, i have a question, that whether in industry, where there are a lot of sensors and actuators, doe they use HAL library, or bare metal, or both are used according to application demand?

guruG
Автор

hi, thank you for the video, how many ports are there and how to know which pin is in which port

sudhansumtripathy
Автор

Hi, Thx for this tutorial. I don't have clear why do you remove the code of the Rcc oscillator?

Fabio_Denaro
Автор

I think the if in line 118 is not necessary

搁这文盲老领导
Автор

Hi,
Thx for this tutorial. I have done this but i have error with If...else . That says : else is error Syntax. I'm new with programming and i cannot find the reason.

samiratalebi
Автор

Nice video
User bottom is connected to pin 13 right

I want to know what is the pin number of reset bottom in stm 32 nucleo

yashwanthl
Автор

helo, very good tutorials, but I have question, why dont work if I want the first example to try out....but in default state I want to have the LED in OFF position and only ON(LED) when I push the button

artiny
Автор

Please work on the audio quality. It’s very hard to understand.

stevergr
Автор

What is GPIOC? Where is explained where that part of the hadware it is?

aeonsalgado
Автор

Is there a documentation that I can refer to for the syntax when writing code? Thanks

rathtanaduong
Автор

thank you, very useful video
keep up the good work

omaralshishani
Автор

Hi
Can you please give the code of driver level without using HAL

sushantchauhan