Initial commit.

This commit is contained in:
Marcus Scholz 2024-01-10 22:41:08 +01:00
commit 474cafb015

24
power_sequence.ino Normal file
View File

@ -0,0 +1,24 @@
#include <avr/interrupt.h>
#include <avr/sleep.h>
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();
}