From 27ce30c0f48e21530c10baaaca5f49fb71cb0580 Mon Sep 17 00:00:00 2001 From: chopster44 Date: Mon, 3 Nov 2025 17:06:37 +0000 Subject: [PATCH] blink --- include/pins.h | 6 ++++++ src/main.cpp | 19 +++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 include/pins.h diff --git a/include/pins.h b/include/pins.h new file mode 100644 index 0000000..0c5335c --- /dev/null +++ b/include/pins.h @@ -0,0 +1,6 @@ +#ifndef PINS +#define PINS + +#define LED 4 + +#endif \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index cb9fbba..b660157 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,18 +1,17 @@ #include -// put function declarations here: -int myFunction(int, int); +#include "pins.h" + +#define BLINKRATE 500 + +long lastBlink = 0; void setup() { - // put your setup code here, to run once: - int result = myFunction(2, 3); + pinMode(LED, OUTPUT); } void loop() { - // put your main code here, to run repeatedly: -} - -// put function definitions here: -int myFunction(int x, int y) { - return x + y; + if ((millis() - lastBlink) > BLINKRATE) { + digitalWrite(LED, !digitalRead(LED)); + } } \ No newline at end of file