commit 474cafb015cb6db72e931f4bcf8f4354150c1c71 Author: Commander1024 Date: Wed Jan 10 22:41:08 2024 +0100 Initial commit. diff --git a/power_sequence.ino b/power_sequence.ino new file mode 100644 index 0000000..f611ca7 --- /dev/null +++ b/power_sequence.ino @@ -0,0 +1,24 @@ +#include +#include + +void setup() { + // Define relais pins + pinMode(19, OUTPUT); + pinMode(20, OUTPUT); +} + +void loop() { + delay(2000); // Wait for 2 seconds + digitalWrite(19, HIGH); // Poweron Relais #1 + delay(2000); + digitalWrite(20, HIGH); // Poweron Relais #2 + stop(); +} + +void stop() { + // Send microcontroller to sleep + set_sleep_mode(SLEEP_MODE_PWR_DOWN); + cli(); + sleep_mode(); +} + \ No newline at end of file