Nice simple LED flasher without blocking, wait or delay and no variables !!

I came across this idea when I was writing a bit of code the other day, not sure if it was my idea or if I got it from somewhere else but nevertherless, its really simple

if (!(millis() & 0b1110000000)) { 
  digitalWrite(LED,HIGH); 
} 
else { 
  digitalWrite(LED, LOW);
}

just stick it in your loop with everything else running !!

This will pulse the LED on for 128ms in every 1024 milliseconds, so I nice short blip !!

To adjust the length of time the LED is on, just change the 0b1110000000

if you require 512ms ON and 512ms OFF, change this to 0b1000000000

obviously there are trade offs, and that is the cycle time can only be 2^n ms, so 256ms, 512ms, 1024ms, 2048ms etc

I chose 1024ms as it was virtually one second