count to 100 then stop - how?

Hello all,

New user here. I'm an old school hardware junky who wants to learn to play with these wonderful little devices.

What I'm looking to do is drive a single LED so that it flashes exactly 100 times. I'd like to use a pot to adjust the duration of each flash.

Any ideas on how to code this? All suggestions welcome!

Thanks in advance, Paul

u need a loop that county 100 times. it's really easy.

this will help you: http://arduino.cc/en/Reference/For

as for the duration of the flash, you just need to read the analog in and use that for a delay before you switch off the led:

http://arduino.cc/en/Reference/AnalogRead http://arduino.cc/en/Reference/Delay