Write directly to PWM pin?

Do you have a question on how to do something.
Ask in here.
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Sun Jul 27, 2014 8:13 am
How can I write directly to the PWM ports? I'm working on a lightning routine and changing it via normal means is not responsive enough.

Something like analogWrite(some pin number, some byte).

--Colin
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Sun Jul 27, 2014 2:06 pm
Roberto?

Posts: 12327
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Jul 27, 2014 2:14 pm
Yes.
Use analogWrite...
Code: Select all
analogWrite(daylightPWMPin,255);
analogWrite(actinicPWMPin,255);
Roberto.
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Sun Jul 27, 2014 3:01 pm
Thanks! That's much better. Now I just need to figure out a good lightning algorithm.

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 3 guests

cron