heres my code for the blink without delay.
const uint8_t Led=13;
boolean LedState=LOW;
unsigned long PreviousMillis=0;
unsigned long CurrentMillis;
unsigned long TimerOFF=1000;
unsigned long TimerON=100;
void setup()
{
pinMode(Led,OUTPUT);
}
void loop()
{
CurrentMillis=millis();
if (LedState==LOW)
{
if (CurrentMillis-PreviousMillis>=TimerON)
{
PreviousMillis=CurrentMillis;
LedState=HIGH;
}
}
else
{
if (CurrentMillis-PreviousMillis>=TimerOFF)
{
PreviousMillis=CurrentMillis;
LedState=LOW;
}
}
digitalWrite(Led,LedState);
}
would this be better in term of implementation.