Need help with project

I need to blink an led at an adjustable rate (up and down buttons)

When micro switch input go’s high momentarily than blink at the set rate until micro switch go’s high again than stop.

blink should be adjustable to once a second to once every 60 seconds with a one second on time…

there will need to be an LCD interface that will display the current setting (Adafruit RGB LCD Shield)

pretty simple sketch I just don’t have enough programing experience yet to get this done.

Its actually going to be used in a water treatment system. We have a chemical pump that requires a pulse to dose chlorine into a filtration system. The filter controllers provide a pulse output based on flow wile they are running so that the water passing through them is treated. once every hour or so the go into what’s called back wash, where they rinse themselves out of all the contaminants and sediment collected. For some reason the pulse output stops wile in this setting and untreated water is used to rinse the media inside witch could cause problems.

what I want to implement is a piece of equipment that will read when the filters are in backwash (A micro switch that is triggered momentarily on the filters actuated valve head) and output a controllable pulse rate that can be adjusted through a lcd interface and up and down buttons.

Pleas help if you can. where do I start?

If you are using Arduino, study the BlinkWithoutDelay example provided with the development system, to understand how to manage timed events without blocking. Study the other examples to learn how to read buttons and display on the LCD. Finally, this post describes how to manage several different timed events concurrently: http://forum.arduino.cc/index.php?topic=223286.0

Start by googling ‘Arduino Blink’ (assuming you’re trying to use an arduino).

http://www.arduino.cc/en/Tutorial/Blink … linkingLED

yes. Im using an uno. I can manage to get most of it accept the variable off time of the led (or pump pulse) it will always have an on time of 1000 millis. how would I make the off time adjustable?

Post your code, using code tags.

Adjustable time? Measure the wiper voltage of a potentiometer with analogRead. Use that result for the off-time delay. Though it can go up to 1023, so not exactly 1000 millisecond delay. And may need multiplication to go upto a minute.

p.s. The recent Sparkfun blog about statemachines might also help to visualize the way it needs to work, and generate code for that: (it also builds up from the blink sketch)

https://www.sparkfun.com/news/1801