Adjust "Blink" frequency with a potentiometer?

Is there an easy way to use a pot to adjust the frequency of the "Blink" program?

Connect the pot to an analog input. Read the analog input using analogRead(). Replace the number in delay() with the number returned by the analogRead().

Something like this?

// the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(analogRead(A0)); // wait for the Time Delay in input A0 digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(analogRead(A0)); // wait for the Time Delay in input A0 }

5V connected to pot pin 3, 0V connected to pot pin 1, wiper from pot pin 2 connected to analog input 0 on Arduino.

That is the idea, yes. What does the code do? Is that what you want the code to do?

The next step is to learn the blink without delay method so that you can write programs without the blocking delay() function.

I'm trying to use a pot to work to adjust a timer. I figured that if I can get it to adjust blink, I should be able to adapt it from there. I've never experimented with the analog input.

analogRead() will return a value from 0-1023. In the example you posted, the delay would last a maximum of 1023ms. You can use the map() function to customize the range if you wanted a longer delay.