Arduino - Multitask Your Programs - Example with 2 LEDs Blinking at Different Rates

  Рет қаралды 24,895

Robotics Back-End

Robotics Back-End

Күн бұрын

Пікірлер: 24
@luccubsol
@luccubsol 2 жыл бұрын
This overly underrated, adore it. TYSM♥
@pufarinu
@pufarinu 2 жыл бұрын
Great video. Thanks mate!
@rommerts
@rommerts 3 жыл бұрын
Perfect tutorial. Thank you! This is a nice one to place on your website.
@Alsifnrbdvehrj
@Alsifnrbdvehrj 2 жыл бұрын
This helped a bunch! Subscribed and thank you😁
@LowerDeckProps
@LowerDeckProps 2 жыл бұрын
Excellent video. Is is possible to download the sketch you created in the video? Thanks.
@neon8647
@neon8647 2 жыл бұрын
Hello Sir! Very good Video. I tried by myself and it works very fine. But now I have a question for a modification. I want to bulid Helicopter-Anti-Collison lights. So I need the LEDs flashing. Now the LED is 1 second on, and 1 second off. For the Heli-Light I would need for example 25 milliseconds on and 1 second off. How can I realize that? Thank you very much!
@davi4828
@davi4828 3 жыл бұрын
Thank u, you helped me a lot. Keep up the excellent work! :D
@cliffordnealon
@cliffordnealon Жыл бұрын
Thanks, this is great stuff.
@jawaharnehru8531
@jawaharnehru8531 Жыл бұрын
In this now how to set different high and low delay for a single led
@BonyaBoy
@BonyaBoy 2 жыл бұрын
is it possible to blink the lights at two different random rates? I'm trying to simulate the "flicker" of a tv on the walls of a model structure on an HO Model railroad. This is soooo close to what I need! I just need randomness on both legs now! Doable??
@magmagth4346
@magmagth4346 2 жыл бұрын
Many thanks I have a text file stored in sd memory as follows, it consists of three columns 0'10,0 10,0,0 0,0,10 0,0,0 10,0,0 .. I have three LEDs connected to three terminals (pins) of the Arduino, for example 7,8,9 How do I get a code that enables the Arduino UNO to read the text file and convert each number 10 to 5 volts on one of the three pins Thus, it will light three LEDs sequentially according to the data stored in the SD card memory. Thank you very much
@pietrobassoli
@pietrobassoli Жыл бұрын
veramente un buon lavoro ma dove possso copiare il codice senza scriverlo a mano?....Nel caso volessi fare su entrambe le uscite 4 lampeggi poi un t off regolabile mi serve per ogni ramo un ciclo di conteggio poi un delay con uscita off ? Hai qualche esempio di codice per contare i lampeggi per poi fare un jump a un ciclo for-next? Grazie per la tua gentilezza . Piero
@louisfain
@louisfain Жыл бұрын
How accurate would this program be? shouldn't it totally be dependent on how fast the Arduino is able to run through the loop? so say if it loops through every 20 miliseconds (just a random number i made up), you would go from 1280 to 1300 milisec in one iteration, so the led would instead be blinking at 1300 milisec.
@RoboticsBackEnd
@RoboticsBackEnd Жыл бұрын
Yes you're correct in your understanding. Now, the Arduino goes very fast (each instructions is just a few microseconds), so one iteration of the void loop should take way less than a millisecond (if you don't have delay() and no huge loop inside). So, the program can be quite accurate, up to a few microseconds.
@louisfain
@louisfain Жыл бұрын
@@RoboticsBackEnd Thank you for your answer!
@nurizzah1610
@nurizzah1610 Жыл бұрын
if i don't write byte just ledstate = low, is it still correct ?
@japheth6659
@japheth6659 2 жыл бұрын
What if I want to stop both leds up to 1 minute?
@neuro_corgi
@neuro_corgi 2 жыл бұрын
Actually, the program will stop working after about 50 days because passed time will overflow unsigned int and will become zero again
@RoboticsBackEnd
@RoboticsBackEnd 2 жыл бұрын
Yes, the time with millis() is going to overflow after about 50 days, but the way the code is written, it's not going to be a problem - so it's going to work indefinitely. Check out the explanation here --> kzbin.info/www/bejne/hme1kKKcjLaZq9k
@Henry-sv3wv
@Henry-sv3wv Жыл бұрын
overflow doesn't matter if you write it right
@elieeid8865
@elieeid8865 Жыл бұрын
How to make LED1 blinks 5 times, and the LED2 blinks 10 times when the LED2 stops blinking
@RoboticsBackEnd
@RoboticsBackEnd Жыл бұрын
You could add 2 variables: use a counter for LED1, and a counter for LED2
@elieeid8865
@elieeid8865 Жыл бұрын
@@RoboticsBackEnd I'm not so pro. How to add a counter on it please. And thank you for replying
@Victurf
@Victurf Жыл бұрын
Beaucoup trop compliqué!
How to use millis() function to multitask in arduino code.
10:34
Mario's Ideas
Рет қаралды 60 М.
How to do multiple tasks in Arduino | Beginners | millis() function
10:23
ضربت اختها هي وعم تعمل عرض ازياء 🥹 #youtubeshorts #baby
00:12
Maria & Cataleya Official
Рет қаралды 3,4 МЛН
I Took a LUNCHBAR OFF A Poster 🤯 #shorts
00:17
Wian
Рет қаралды 15 МЛН
English or Spanish 🤣
00:16
GL Show
Рет қаралды 16 МЛН
나랑 아빠가 아이스크림 먹을 때
00:15
진영민yeongmin
Рет қаралды 15 МЛН
How to Turn on 2 LED lights with Arduino and Breadboard
5:06
How to Learn
Рет қаралды 17 М.
Arduino - How to Save a String into EEPROM
11:31
Robotics Back-End
Рет қаралды 16 М.
How to Blink LEDs with Timers and Interrupts in C (MSP430, Arduino)
14:32
How to Use a Button with an Arduino (Lesson #5)
20:57
Science Buddies
Рет қаралды 78 М.
Arduino Sketch with millis() instead of delay()
14:27
Programming Electronics Academy
Рет қаралды 228 М.
You can learn Arduino in 15 minutes.
16:34
Afrotechmods
Рет қаралды 10 МЛН
How To Scale Meta Ads in 2024
8:07
The Marketing Freaks Podcast
Рет қаралды 543
How to Use Millis to Master Arduino Multi-tasking
50:17
Rachel De Barros
Рет қаралды 53 М.
ضربت اختها هي وعم تعمل عرض ازياء 🥹 #youtubeshorts #baby
00:12
Maria & Cataleya Official
Рет қаралды 3,4 МЛН