#define FASTLED_INTERNAL
#include <FastLED.h>
#include <Wire.h>
#define streetLights 5 // includes security lights
unsigned long Millis = 0;
unsigned long lastMillisUpdate = 0;
void setup() {
pinMode(streetLights, OUTPUT);
}
//------------LOOP-------------
void loop() {
streetLightsRoutine();
}
//------------------------------
//Functions *************
//*******************************
void streetLightsRoutine()
{
if ((Millis >= 5000) && (Millis <= 10000)) {
digitalWrite(streetLights, HIGH);
}
else {
digitalWrite(streetLights, LOW);
}
if (millis() != lastMillisUpdate) {
Millis++;
lastMillisUpdate = millis();
}
if (Millis >= 15000) {
Millis = 0;
}
}