Page 1 of 1
Simulated Lighthouse Light
Posted: Fri Mar 10, 2017 11:15 am
by JDR04
Hi folks. Could somebody please show me how to "ramp up" a white led and then FLASH at the end. I've attached a waveform incase my explanation is somewhat confusing. I'm building a small light house for our village to raise some funds for christmas lights for the kids.The software side has got me completely stumped.
Is it possible to ramp up and ramp down an led with FLOWCODE 5?? Thanks a lot....John
Re: Simulated Lighthouse Light
Posted: Fri Mar 10, 2017 11:57 am
by Benj
Hi John,
It certainly is possible. I would use either hardware PWM or create my own software PWM using a timer interrupt.
Once you have the PWM up and running it should just be a case up ramping up the duty from say 0 to 100 and then jumping directly to max brightness at 255, wait a short amount of time and then reduce back to 100 and ramp back down to 0.
This article may help with creating software PWM.
http://www.flowcode.co.uk/article.php?a=52
Let us know how your getting on.
Re: Simulated Lighthouse Light
Posted: Fri Mar 10, 2017 3:07 pm
by JDR04
Thanks Benj, I'll go through it tonight and let you know how I get on.