I think he confessed but he said he said he was under a lot of stress and he apologized for his actions saying he wouldn ' t do it again . He said he felt bad I do think think he deserves any flak . <| sep |> In the few minutes I had between last response I actually managed to get 99 % of the desired output ! # include math . h int buttonState 0 int button 2 int arcLed 9 int buttonLed 10 unsigned long animationEnd 0 unsigned long animationDur 10000 void setup pinModebutton , INPUT pinModearcLed , OUTPUT pinModebuttonLed , OUTPUT void loop buttonState digitalReadbutton digitalWritebuttonLed , HIGH ifmillis animationEnd analogWritebuttonLed , 0 float val expsinmillis 2000 . 0 PI 0 . 36787944108 . 0 analogWritearcLed , val else digitalWritearcLed , LOW if buttonState HIGH animationEnd millis animationDur I guess my way puts the same value in where it needs to be but it ' s way less efficient haha . The only thing that I can ' t get a grip on is why buttonLed stays very dimly lit during the animation I have my suspicion that a diode would probably sort that out as the LED works with the ve coming from either side Chinese button who knows ! In any case we ' re at a totally workable state . I ' m very interested in how this whole thing functions though . If millis is less than animationEnd which is 0 do the animationbut how does the code work when you step through each section ? Does it poll both of these if statements one after the other ? I think it works kinda like an arcade machine it constantly ' wants ' to play the animation , and the buttonpress is like inserting a coin , creating an endpoint to the animation in the future animationDur current time in millis , millis is constantly advancing so the test will only stop the animation once we see millis millisduration . I was trying to articulate what I was reading and explaining how I didn ' t understand it and it suddenly just sort of clicked . OEither way I ' m very pleased that this is working , and very greatful for the help you ' ve given me . If I ' m misunderstanding the way this works please let me know because I will have to unbreak my understanding !