Hi everyone!
I need to blink and LED and the delay between each blink should increase logarithmically, is there a simple way to do this?
I'm sorry if this question sounds a bit silly, but i'm totally a new user and so far i couldn't find a nice solution.
Thank you very much!
![]()
I need to blink and LED and the delay between each blink should increase logarithmically
Is that a real need or an piece of homework?
It is quite a useless thing to want to do because after a blink or two you will be waiting a long time.
Do you need to do anything else while it is blinking?
The C language has a log function you know:-
I use the LED as light source for an experiment and i have to coordinate the LED blinking to the data acquisition mode, anyhow, the experiment takes several minutes...
That makes little sense the way you describe it.
Anyway what is wrong with the log function I posted?
fedepoja:
I need to blink and LED and the delay between each blink should increase logarithmically
Actually, "increasing logarithmically" makes little mathematical sense, as logarithms generally decrease the progress of a series.
I presume you mean exponentially. You do not need a full math library to implement an exponential series (but you do need long integers), you simply repeatedly multiply by a given number, and multiplication by a fixed (integer) number can be performed by a shift-and-add procedure.