I want a led to gradually have shorter light flashes towards the end. All in all it should take 21 minutes. Pushing the switch once should lead to pause. Pushing it again should continue.
Starting the code from the get-go without pushing any button, the led flashes once, only. Do you know why?
Code:
pos = 1
counter = 1260
while pos < counter
pos = pos + 1
LED = 1
time = ((-851 * pos)/counter)+1003
Pause time
LED = 0
Pause 1000-time
if switch = pushed then
Pause 100
WHILE switch = unpushed
WEND
Pause 100
endIF
Wend
Bookmarks