[SOLVED] Adjustable timer

Status
Not open for further replies.

Tautomer

Newbie
Joined
Oct 18, 2021
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
13
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).
 

Consider mBlock.

Take a look at this -


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-




Regards, Dana.
 

Attachments

  • 1634604921115.png
    212.1 KB · Views: 147
Last edited:

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 !

Regards, Dana.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…