Science Bob
USA
Asked
— Edited
Resolved by DJ Sures!
No lucking finding a post on this. I am working on a BB-8 driod with the EZ-Robot and am looking to get LEDs to quickly ramp to full brightness and fade out the same way (as opposed to just turn on or off.) Any ideas on the best way to achieve this?
Thanks,
Bob
Yes, you can use PWM to control the brightness of an LED, so a script that ramps up and down the pwm going to the digital port will do it.
Alan
Use the ServoSpeed() command to apply a ramping speed to the PWM. And as alan mentioned, use the PWM command to set the brightness.
Something like this...
I figured it might be through the servo controller. Seeing the code is very helpful. Thanks for the fast response, guys!
Oh, good one DJ. I didn't think about using the PWM ramping built into Servospeed.
I did this script (D11 is my LED)
(this just ramps up, not back down).
@Science Bob.... Next time ask us something really challenging will ya.... LOL
Welcome to ez robot, btw....
Here's a tutorial i just made on this subject: https://synthiam.com/Tutorials/UserTutorials/179/1
Amazing DJ!