Timer Arduino based button switch programmed Electrical socket
ฝัง
- เผยแพร่เมื่อ 16 พ.ย. 2024
- Timer Arduino programmed socket
This is an Arduino based assembled project, that uses button switch preset to set up the time of which a socket should be turn ON or OFF
Schematic diagram here
drive.google.c...
Arduino code here,
drive.google.c...
Nice project sir.
I do have some questions sir.
1. Having uploaded the code and building the circuit, I was unable to set the period for minutes and hours, what could be wrong?
2. According to the video you only set the period to 14secs, have you tried setting the minutes and hours as well?
if (settings == true)
{
lcd.clear();
lcd.print("Power ON!");
lcd.setCursor(0, 1);
lcd.print("Time left:");
lcd.print(seconds);
lcd.print("sec");
lcd.blink();
digitalWrite(relay, HIGH); // turn on relay
seconds--;
delay(1000);
}
3. According to the lines of code (from your sketch) above, the device will only countdown the seconds neglecting the minutes and hours.
4. Also, the variables 'seconds', 'minutes' and 'hours' are not highlighted as yours in my arduino IDE, could that be the IDE(Arduino 1.8.15) I am using?
Thanks for your reply in advance.
Confirm if you were able to set it in seconds
@@MagnumTechnicalAcademy Yes, I was able to set it in seconds, with maximum of 60secs.
Okay, that was the limit for this build, I didn't set up the hour and minutes
@@MagnumTechnicalAcademy Thanks a lot sir.
Nice project ir
Can y have a code and circuit diagram?please 😇
So sorry, it will be updated in 24hrs