Arduino UNO R4 Lesson12 - millis Function | Handling Multiple Tasks | Non-Blocking Code

  Рет қаралды 6,939

Education is Life (joed goh)

Education is Life (joed goh)

Күн бұрын

Пікірлер: 40
@philgirard3956
@philgirard3956 3 ай бұрын
Hello, thank you for this beautiful video. I'm a novice and I'm stuck doing the exercise. in the example the on and off time of the LED is the same, if I code the same principle for another LED, the first LED also lights up even though it should not. the off time of the first LED must be longer than the on time so that the second LED can light up in turn, and I don't know which line of code to intervene. where is the answer to the solution and sorry for my broken english. thank you
@alistaircook1997
@alistaircook1997 8 ай бұрын
Great lesson thank you for your time
@joedgoh
@joedgoh 8 ай бұрын
Thanks for watching 😊 Pls share..
@VictorPang-iq4yh
@VictorPang-iq4yh 7 ай бұрын
Hi Joed, can’t wait to learn from your next lesson.
@joedgoh
@joedgoh 7 ай бұрын
Thank you for waiting. Lesson 13 is now out! Please check 😊
@richardphillips1891
@richardphillips1891 3 ай бұрын
I am still confused on how the multiple lights would be configured so only one comes on at a time. You left a clue about the pos=90 to display the green LED but I'm unclear on where that logic would be. Is there "challenge code" I can lookup to see how to handle this?
@richardsardini5585
@richardsardini5585 2 ай бұрын
Seems like a block of code is put out there, then everyone does it exactly the same. I would use a different approach. Simply use one variable such as Blink Blink=millis()+Millisecond interval you desire. millis()+1000=every second. then just check if millis()>Blink IF yes then check if pin is high or low and take appropriate action with your IF ELSE, if high set low and if low set it high. Then just put Blink=millis()+1000 just before exiting your if statement when you checked if millis() was > Blink.
@iMjoooooo
@iMjoooooo 8 ай бұрын
Hi prof! Can you do a video tutorial for PUG xml and ruby on rails?
@sheekosheko
@sheekosheko 7 ай бұрын
I have a question and its. How can use single Arduino. Into multiple sensors like. Developing home automation systems using RFiD,Light,Fans, and temp. Using 1 Arduino and mobile app
@joedgoh
@joedgoh 7 ай бұрын
Hi, your question is broad and cannot be answered directly here with a simple chat. It is a combination of concepts that you will learn in the future if you continue watching this series. Thank you
@KingKong-kk4bs
@KingKong-kk4bs 8 ай бұрын
Hi sir, how do we use push button as trigger/ toggle the movement of servo with millis since usually I used delay?
@joedgoh
@joedgoh 8 ай бұрын
The same way as I have discussed in this lesson. How do you use it using delay by the way? Let me see your code first.. thanks
@samnus
@samnus 5 ай бұрын
i have a challenge also to you. Blink a LED every 1 second continuously using a simple sketch with 3 lines of code using 2 functions only. Materials needed are Arduino uno, 220 ohms resistor and LED.
@joedgoh
@joedgoh 5 ай бұрын
Your instruction is incomplete. Does it have to be custom function or a built-in function like a simple digitalWrtie and digitalRead will do?. Is it required to use millis because you posted it on this topic? By the way, using 220 ohms resistor on UNO R4's gpio when connecting to an LED is not advisable, as its max current is only 8mA. I might not be able to answer your challenge because I don't know anything. I just teach and share what I know. I don't challenge others just to prove that i am better than them, because I am not. Please teach me and the others how it is done. Thank you.
@gyrurur
@gyrurur 8 ай бұрын
How to decode ir remote using r4 minima
@RobertBeesley
@RobertBeesley 8 ай бұрын
Are there solutions to your challenge activities on the web?
@joedgoh
@joedgoh 6 ай бұрын
Hi, I'm sorry but I don't post the Challenge Activity on the web. Thank you for your support 😊
@PhG1961
@PhG1961 8 ай бұрын
Excellent!
@joedgoh
@joedgoh 8 ай бұрын
Thank you!
@alistaircook1997
@alistaircook1997 8 ай бұрын
when will we see your next lesson 13
@joedgoh
@joedgoh 8 ай бұрын
Hi Alistair, I'm sorry for not being able to produce lesson 13 this week. I've been out of the country since last week (Japan 😃 ). I will start lesson 13 by next week. Thanks for watching! :)
@sheekosheko
@sheekosheko 7 ай бұрын
Excuse me sir. I would like to contact you
@chitobalazo
@chitobalazo 6 ай бұрын
Hi Joed, I installed avr boards 1.0.5 as per your video. However it’s not finding .
@joedgoh
@joedgoh 6 ай бұрын
You have to install it. github.com/PaulStoffregen/PWMServo Please see my previous lesson
@vijaysulakhe5605
@vijaysulakhe5605 5 ай бұрын
Will these work on R3 also?
@joedgoh
@joedgoh 5 ай бұрын
Yes, codes here are compatible with R3
@vijaysulakhe5605
@vijaysulakhe5605 5 ай бұрын
@@joedgoh Thanks...for making such interesting educational videos.
@joedgoh
@joedgoh 5 ай бұрын
You are welcome 😊 Glad to be of help. Pls share.
@vijaysulakhe5605
@vijaysulakhe5605 5 ай бұрын
@@joedgoh I told all my students.👍
@joedgoh
@joedgoh 5 ай бұрын
Thank you so much :)
@michelealbanese4438
@michelealbanese4438 7 ай бұрын
Ciao perché non ci sono più video?
@joedgoh
@joedgoh 7 ай бұрын
Hi, I will upload lesson 13 soon. I had a project for a month and I was not able to produce a video. Thank you for waiting.
@vijaysulakhe5605
@vijaysulakhe5605 5 ай бұрын
My request... kindly make such videos for Pi Pico W....it has lot of resources... and students ( and we also) are very much cost conscious...I can have 3 Pi Pico at cost of one R4...£ $ € Rs matter...many thanks.
@joedgoh
@joedgoh 5 ай бұрын
Hi. Thanks for your suggestion and I understand your concerns. However, as of now, I do not have any sponsor for R pi pico W. If it wasn't for SunFounder who provided me with the Arduino kit and sponsoring this series, I would not be producing videos anymore because it is hard and time consuming. I only do it on a part-time basis. Producing online lessons is also costly. When I have a spare time and/or sponsorships, I'll produce the R pi pico W series. Thank you for understanding! 😊
@Cheene-n2h
@Cheene-n2h Ай бұрын
Sir magkano po ang sunfounder na kit?
@joedgoh
@joedgoh Ай бұрын
Depende sa model/package. Eto yung gamit ko sa series na to. Pls check. SunFounder Ultimate Sensor Kit with Original Arduino Uno R4 Minima www.sunfounder.com/products/sunfounder-ultimate-sensor-kit-with-original-arduino-uno-r4-minima?ref=hmqmlw0e
@NoName-ut9wd
@NoName-ut9wd 2 ай бұрын
How we can reset millis(), after 50 days it will be overflow !!!
@Cheene-n2h
@Cheene-n2h Ай бұрын
FF.
Arduino UNO R4 Lesson13 - Hardware Interrupts | Debouncing a Button
25:11
Education is Life (joed goh)
Рет қаралды 4,3 М.
Arduino UNO R4 Lesson15 - SSD1306 OLED Display | Text, Graphics, and Animation
23:15
Education is Life (joed goh)
Рет қаралды 9 М.
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
If people acted like cats 🙀😹 LeoNata family #shorts
00:22
LeoNata Family
Рет қаралды 21 МЛН
Arduino millis() function: 5+ things to consider
12:49
Programming Electronics Academy
Рет қаралды 143 М.
How to do multiple tasks in Arduino | Beginners | millis() function
10:23
How to use millis() function to multitask in arduino code.
10:34
Mario's Ideas
Рет қаралды 62 М.
Arduino Sketch with millis() instead of delay()
14:27
Programming Electronics Academy
Рет қаралды 232 М.
Arduino delay() and millis()  Functions: Tight Loops and Blocking Code
13:00
Programming Electronics Academy
Рет қаралды 104 М.
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33