delay

can the delay in a sketch be controlled externally from the sketch

daniellyall: can the delay in a sketch be controlled externally from the sketch

Do you mean something like:

delay(analogRead(pin)); // delay up to approx. 1 second based on reading from analog input

I mean - that would work, but it wouldn't be the best way for your code to be written because delay() is a blocking function; you could, though, do something similar that isn't blocking, once you understand how the "blink without delay" example sketch works:

http://arduino.cc/en/Tutorial/BlinkWithoutDelay#.UwKTNEkS0ss

will test code see what happens