From 776e73b2586a9a40e8cb34640363cced623fb3cb Mon Sep 17 00:00:00 2001 From: Thijs Raymakers Date: Wed, 19 Jun 2024 23:17:34 +0200 Subject: [PATCH] Blink both the relay and LED --- src/main.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1d27ab7..c68e961 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,19 @@ #include -void setup() { Serial.begin(9600); } +#define RELAY 2 // GPIO4 +#define LED 5 // GPIO5 + +void setup() { + Serial.begin(9600); + pinMode(LED, OUTPUT); + pinMode(RELAY, OUTPUT); +} void loop() { - Serial.println("Hello world!"); + digitalWrite(LED, HIGH); + digitalWrite(RELAY, HIGH); + delay(1000); + digitalWrite(LED, LOW); + digitalWrite(RELAY, LOW); delay(1000); }