PWM slope with arduino ethernet

Any ideas on how to accomplish a 0-255 slope over 8 hours and then back down again at the end of the time frame?

I have two PWM drivers for LEDs and need them to slowly slope over the duration and then back down again for night time.

THANKS!

  1. Find out how many milliseconds are in 8 hours.
  2. Divide that number by 255.
  3. That's how often you need to go up a step.

Thanks..

BUT I mean the coding for that... :frowning:

Clueless how to code that...I figured the math out

Uh... I know, I'll Get a Book... Naah, That is money I Think I'll search Google for that Free Wiki course on C++...

Bob

Docedison:
Uh... I know, I'll Get a Book... Naah, That is money I Think I'll search Google for that Free Wiki course on C++...

Bob

Man this forum isn't anything more than a bunch of smack talk. For whatever reason...I'm learning...MY BAD

Delete thread...I won't be back

If you are still around, have a look at blinkwithoutdelay in the example sketches, play with it to blink at the interval you have calculated.

Then change it to increase your ramp value instead of blinking ramp = ramp +1 .

If ( theres the clue ) it gets to 255 , make it reverse.

ditto for zero.

drewpalmer04:
Man this forum isn't anything more than a bunch of smack talk. For whatever reason...I'm learning...MY BAD

Delete thread...I won't be back

LOL!

What did you think this was? A place where people write your code for free?

What did you try? Did you make any effort at all? Did you google for one of the hundreds of similar programs then try to adapt it? There's no sign of any of that in this thread...