Server switch on after power failure using Arduino Part 1

preview_player
Показать описание
The Arduino will switch the relay on for one second.
Connect the relay in parallel with the on switch.

Connect the Arduino to a power source that will switch on when power is restored.

Here's the code.

#define SerPWR 2 // Which pin to use
void setup() {
// put your setup code here, to run once:
pinMode(SerPWR, OUTPUT);
digitalWrite(SerPWR, HIGH); // Make sure the relay is off. High is off. Low on.
delay(1000); // wait 1 second
digitalWrite(SerPWR, LOW); // Turn the Relay on.
delay(1000); // wait 1 second
digitalWrite(SerPWR, HIGH); // Turn the Relay off.
}

void loop() {
// put your main code here, to run repeatedly:

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

Awesome video and got me much better in understanding arduino... thank you...

mukky
join shbcf.ru