Renumbered pins for easier cable routing, initialized pins HIGH.

This commit is contained in:
Marcus Scholz 2024-01-14 15:00:17 +01:00
parent 9ab4866199
commit 58078472d7

View File

@ -11,12 +11,15 @@
#endif #endif
// Define relais pins // Define relais pins
#define relaisPin_1 12 #define relaisPin_1 11
#define relaisPin_2 13 #define relaisPin_2 12
void setup() { void setup() {
Serial.begin(9600); // open the serial port at 9600 bps Serial.begin(9600); // open the serial port at 9600 bps
// Init pins HIGH
digitalWrite(relaisPin_1, HIGH);
digitalWrite(relaisPin_2, HIGH);
pinMode(relaisPin_1, OUTPUT); pinMode(relaisPin_1, OUTPUT);
pinMode(relaisPin_2, OUTPUT); pinMode(relaisPin_2, OUTPUT);
@ -26,11 +29,11 @@ void setup() {
void loop() { void loop() {
delay(2000); // Wait for 2 seconds delay(2000); // Wait for 2 seconds
Debugln("Enable power rail #1"); Debugln("Enable power rail #1");
digitalWrite(relaisPin_1, HIGH); // Poweron relais #1 digitalWrite(relaisPin_1, LOW); // Poweron relais #1
delay(2000); delay(2000);
Debugln("Enable power rail #2"); Debugln("Enable power rail #2");
digitalWrite(relaisPin_2, HIGH); // Poweron relais #2 digitalWrite(relaisPin_2, LOW); // Poweron relais #2
delay(50); // wait for UART to finish delay(50); // wait for UART to finish
stop(); stop();