Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: Fade PWM in (almost) realtime. on: January 30, 2013, 04:45:28 pm
I can use a For loop, but  i run the  danger of the loop taking longer to complete than the clock takes to cycle  if i only increment by one.  I could  do larger increments but loose resolution.
2  Using Arduino / Project Guidance / Fade PWM in (almost) realtime. on: January 30, 2013, 04:06:14 pm
I have a clock setup that is changing LED brightness according to the  last number in the seconds value.  this number can be 0 to 5.  So to get the PWM i have done this...

TimeInPWM = map (TimeFromRTC,  0, 5, 0, 255);

This gives me a LED that brightness can tell you the value of the ones digit that represents the current second.

I am trying to find a way to have the led fade from one value to another instead of have it jump exactly on the second tick.  Any thought on how i can accomplish this ?
Pages: [1]