Add initial ESP32 controller firmware
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include <Arduino.h>
|
||||
#include "config.h"
|
||||
#include "relays.h"
|
||||
|
||||
RelayState relays;
|
||||
|
||||
void initRelays() {
|
||||
pinMode(RELAY_STARLINK_PIN, OUTPUT);
|
||||
pinMode(RELAY_FRIDGE_PIN, OUTPUT);
|
||||
|
||||
updateRelayOutputs();
|
||||
}
|
||||
|
||||
void updateRelayOutputs() {
|
||||
digitalWrite(RELAY_STARLINK_PIN, relays.starlink);
|
||||
digitalWrite(RELAY_FRIDGE_PIN, relays.fridge);
|
||||
}
|
||||
Reference in New Issue
Block a user