Hello.
I am trying to build a circuit, where a single LED is blinking with a specific frequency (using breadboard). Is there a timer I could use, where the output frequency can be changed within a program?
Example: LED is blinking 100 times per second. By the press of a button, I want to change that to 60 times per second (and many other different values). If I used the 555 timer, I would have to fixly set the frequency while building the whole circuit (or using potentiometer).
Often users, developers, hobbyists need timed and qualified event generators, many resorting to 555 timers and the like. The venerable 555 has had a long run but its limited in accuracy and capability. This approach uses block language to create...
www.electro-tech-online.com
Your basic task would look like this solution -
If you click the little x right hand border screen orange tab you can see the code generated
from you block choices and configuration. Basically C code, Arduino style.
Use Arduino Nano board, ~ $ 3, download mBlock (its free) , and start programming
in blocks.
Note its easy to change from button operated to pot operated, there is a block to
read V on a pin which you can modifiy the block configuration to handle.
Regards, Dana.
--- Updated ---
Here is all it takes to read a pot V and set a PWM output Duty Cycle
based on V-
So its clear you are not writing code, you drag and drop blocks, config
them, like pick what pin you want to drive or read, and then mBlock generates
the Arduino code from your block list.
Folks who do not program do not realize iof they use a 4 function calculator
they have been programming for years, in their head. Limited programming
but programming never-the-less. You know when you have to store a number
to use later in its memory, you know the sequence of operations you need to
do, the data you have to enter, you have been programming !