How do I flash an LED on for 100ms and off for 3000ms without using delay?
Thanks in advance.
How do I flash an LED on for 100ms and off for 3000ms without using delay?
Thanks in advance.
Look at the blink without delay example.
marco_c:
Look at the blink without delay example.
But you'll need to think about how to have two different intervals for on = 100ms and off = 3000ms. As that example stands, the led is off and on for the same interval...
Could someone point me in the right direction. I have uploaded the blink without delay, but cannot see how to get the 'short on' and 'long off'
You'll need to keep two delays, timers and a state record
E.g.
delayBlinkOn
delayBlinkOff
timerBlinkOn
timerBlinkOff
stateBlinkOn
stateBlinkOff
Now, go code that up.
All you need to do in the blink without delay is change the value of "interval" when you change the LED state.