Multitasking with Arduino | Relay Timer Controller

preview_player
Показать описание
In this video, I demonstrate a relay timer controller. It is implementing millis function to achieve multitasking.

In here the following task are separate task to demonstrate multitasking:
1. The ON state of the relay (simulated through the LED)
2. Navigating the LCD menu by using buttons

For more details, (circuit diagram and source code) visit my blog post:

If you find this video as helpful, please give me thumbs up and Share this to your friends.

Leave your comments in the comment box.

Please do not forget to Subscribe.

Thank you and have a good day.
Рекомендации по теме
Комментарии
Автор

This looks good for my project as I need to turn a LED on for 2 seconds at 6pm and turn a LED on for 2 seconds at 12 pm

MrBobWareham
Автор

Hey. Your video was very useful. But i have a problem that everytime i reboot the controller, the set value is erased. Can you make a video with saving the values in eeprom?

Vortextech
Автор

Using your example, could you have one input to initiate executing all three after setting the individual timers

johnalex
Автор

Respcted Sir,
Thanks for video,
Sir, yet i didnot found code for the, if during process the displayed value (analog signal) start increasing toward maximum value, at one point of time it will become constant(now not increasing), one pin of microcontroller will 'LOW' (initially high)
Sir can you help.

manojgorana
Автор

Please More on this topic. All about time Scheduler

ledc
Автор

Can you provide a similar program but made the port timings in loop; first port (led) on for X-amount of time, second port (led) on for X-amount of time and so on. I would need such a program to control up to five relays in sequence one after another, then stop. Then execute with trigger pulse.

elfillari
Автор

Thanks. really helpful. More Please add timer in milliseconds

ledc
Автор

I measure weight with arduino and then print with thermal printer. currently measuring and printing. but what I want is to have the button active after measuring. ie multitasking. can you help me
void loop()
{
do
{

if
{
//350ms geçti
lc.clearDisplay(0);
lc.clearDisplay(1);
lc.clearDisplay(2);
lc.clearDisplay(3);
lc.clearDisplay(4);
lc.clearDisplay(5);

animationCounter++;
if (animationCounter==6)
{
animationCounter=0;
}


}
} while(digitalRead(7)==HIGH);



measureHeight();
measureWeight();
delay(1000);
measureHeight();
measureWeight();
delay(1000);
measureHeight();
measureWeight();
delay(1000);
wdt_reset();


turnOffDisplays();
delay(500);

displayWeight();
digitalWrite(13, HIGH);
delay(500);
turnOffDisplays();
digitalWrite(13, LOW);
delay(500);

displayWeight();
digitalWrite(13, HIGH);
delay(500);
turnOffDisplays();
digitalWrite(13, LOW);
delay(500);

displayWeight();
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
wdt_reset();

previousTimeButton=millis();
do
{
currentTimeButton=millis();
if
{

yazdirSureBitti=true;
break;
}
}

//Buton basma için zaman geçti

if (yazdirSureBitti==false)
{
print();
}
yazdirSureBitti=false; //

}

vangeziyorum
Автор

Dear sir can u make in all funtion with one task in one time, can u make for me

ViralInWorld
Автор

How place pin SDA, SCL if using i2c modul..?

bjdkipli
Автор

Nice 👍 job but make menu more simple to operate

WaqarAhmed-xrzd