#define LED_BUILTIN 2
unsigned long prevTime =0;
unsigned long currentTime;
unsigned int cycleTime=500;
bool ledstatus=0;
void setup() {
// put your setup code here, to run once:
pinMode( LED_BUILTIN, OUTPUT);
}
void loop() {
currentTime=millis();
if((currentTime-prevTime) > cycleTime){
ledstatus= !ledstatus;
prevTime=currentTime;
}
digitalWrite(LED_BUILTIN, ledstatus);
}