Tutorial 12: Blink an LED without using the delay() function: Arduino Course for Absolute Beginners

preview_player
Показать описание
🤩 FREE Arduino Crash Course 👇👇

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

Thank you so much for the explanation, I am trying to code then upload a song onto an Arduino. Will this work (for the multiple chords)? For example

tone(BUZZER1, 329.628, 2000);

tone(BUZZER3, 391.995, 1000);

tone(BUZZER5, 1046.50, 300);

if(currentMillis - previous Millis > interval1) {

tone(BUZZER3, 391.995, 950);

}

So will these pieces of music overlap, but the delayed bit only overlap after 50 milliseconds?

qaziabzy
Автор

I programed a stepper motor that stop 24 time in one loop.
Would you know how to turn on an led for each stop ? So 24 blink.
LED on while motors stops. LED off while motor rotates. Thanx for your great help

gamecity
Автор

yes, delay will stop the program (or you need to mess with interrupts).

igorkutcher
Автор

Hi i am doing a project on blinking led with delay, the thing is there is some code in the examples for a led blink delay changing using a potentio meter but for me I have 3 LEDs and 3 potentiometers, by using these 3 potentiometers i want to control the delay of 3 LEDs individually i.e led 'A' blinking delay will be controlled by potentiometer ' A' and similarly for LED B and C, i tried many times but result is not as expected, i am new to the programming plz help me

jeevankumarreddyravuru
Автор

What if I would like to change the on and off time to my liking? Means that I just don't want to switch interval.

Xappt
Автор

How can I do the same with buzzer, tone(buzzer, 450); and the noTone(); function

harshsawant
Автор

Hi... I still can not understand why unsigned long is inside thd void loop and not at the beginning of the sketch. Can you explain that to me? Thanks.

guadalupeguerrero
Автор

Friendly FYI: If it takes 50 days to count over the millis() max, that would be ~ 4.32 trillion milliseconds - far more than the 4, 000, 000 mentioned, but I understand it wasn't important for the purpose of the video. =)

krallopian
join shbcf.ru