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
Simulated Lighthouse Light
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Simulated Lighthouse Light
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.matrixtsl.com/article.php?a=52
Let us know how your getting on.
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.matrixtsl.com/article.php?a=52
Let us know how your getting on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 271
- Joined: Tue Mar 05, 2013 10:49 pm
- Has thanked: 111 times
- Been thanked: 13 times
- Contact:
Re: Simulated Lighthouse Light
Thanks Benj, I'll go through it tonight and let you know how I get on.