I'm working on an animatronics project that at the end of my loop, I need two servos to sweep one way as a red LED gets brighter gradually. After a 5 second delay, I need the servos to sweep back downward as the LED fades out. I have the code working for the servos, but I'm not quite sure how to incorporate the LED controls without the use of a potentiometer. Any suggestions? For the record, the animatronic is a balloon sculpture of a dragon. The two servos in use for this segment of the loop operate the wings to move them up in an aggressive nature and the LED will be in the mouth of the dragon to look like fire building up. Then the wings need to relax as the fire dies down.
Have you looked at, tried the example sketch "Fade" ? that should give you a good start.
I did. As a newbie, how do I adapt the code so it doesn't go up one step and then loop back thru the whole sketch before it takes the next step?
Look at the "fade" code. Understand how it works, then you can use that knowledge to do LED levels. You may want to lower the levels you send to PWM (only send it the lower values).
Hey Thanks, Jack! I used the Fading example and modified the code a bit to create the effect I was needing! I'll be posting a link to the video Tuesday.