Blink both the relay and LED

This commit is contained in:
Thijs Raymakers 2024-06-19 23:17:34 +02:00
parent 35e97572d9
commit 776e73b258
No known key found for this signature in database

View file

@ -1,8 +1,19 @@
#include <Arduino.h>
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);
}