Use LED_BUILTIN

This commit is contained in:
Thijs Raymakers 2024-06-19 23:40:24 +02:00
parent fcfe6b537a
commit 9c128d6e15
No known key found for this signature in database

View file

@ -1,19 +1,18 @@
#include <Arduino.h> #include <Arduino.h>
#define RELAY 2 // GPIO4 #define RELAY 4 // GPIO4
#define LED 5 // GPIO5
void setup() { void setup() {
Serial.begin(9600); Serial.begin(9600);
pinMode(LED, OUTPUT); pinMode(LED_BUILTIN, OUTPUT);
pinMode(RELAY, OUTPUT); pinMode(RELAY, OUTPUT);
} }
void loop() { void loop() {
digitalWrite(LED, HIGH); digitalWrite(LED_BUILTIN, HIGH);
digitalWrite(RELAY, HIGH); digitalWrite(RELAY, HIGH);
delay(1000); delay(1000);
digitalWrite(LED, LOW); digitalWrite(LED_BUILTIN, LOW);
digitalWrite(RELAY, LOW); digitalWrite(RELAY, LOW);
delay(1000); delay(1000);
} }