mbvaisman:
Thanks for the help. Would I place the line you sent me into the loop section of the Sketch?
you could put it in the loop function after
sensorValue = analogRead(sensorPin);
Something else to consider...
If you want to be able to read a button, using so often delay() functions isn't a very good idea.
Whenever you use a delay() function it is kind of like "pausing" the arduino, so if you would press a button during that "pause" it wouldn't be read.
The Blink Without Delay is a great way to see what to "delay" things without using the delay() function:
http://arduino.cc/en/Tutorial/BlinkWithoutDelay
Depending on what you would like to do, you could also map the sensor value so you can have a minimum and a maximum delay time:
well, just a couple of ideas.
![]()