2 Commits

Author SHA1 Message Date
927531fa85 fixed blink timer 2025-11-12 20:47:45 +00:00
27ce30c0f4 blink 2025-11-03 17:06:37 +00:00
2 changed files with 16 additions and 10 deletions

6
include/pins.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef PINS
#define PINS
#define LED 4
#endif

View File

@@ -1,18 +1,18 @@
#include <Arduino.h> #include <Arduino.h>
// put function declarations here: #include "pins.h"
int myFunction(int, int);
#define BLINKRATE 500
unsigned long lastBlink = 0;
void setup() { void setup() {
// put your setup code here, to run once: pinMode(LED, OUTPUT);
int result = myFunction(2, 3);
} }
void loop() { void loop() {
// put your main code here, to run repeatedly: if ((millis() - lastBlink) > BLINKRATE) {
digitalWrite(LED, !digitalRead(LED));
lastBlink= millis();
} }
// put function definitions here:
int myFunction(int x, int y) {
return x + y;
} }