Gas light flicker

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Gas light flicker

Post by RobH »

Could someone help me with a small FC code to make an LED flicker with an adjustable rate?

User avatar
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: Gas light flicker

Post by Benj »

Hello Rob,

This article may help: http://www.matrixtsl.com/article.php?a=52

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Gas light flicker

Post by medelec35 »

Hi Rob,
I created flame simulation software for a fire in a dolls house using a bright orange LED.
Looked affective when LED was behind light diffusing material.
Target was 12F1824 running at 4MHz to reduce power.
You will be able to use any target device at any clock speed, but make sure PWM is set at the correct period.
Flowchart combined with Ben's article should get you on your way.

Because I limited my current to less than maximum permitted current and only used one LED I did not use transistors to control LED.
Your setup may be different, so you may need to use a transistor?
Hope it helps

Martin
Attachments
Flame simulation.fcf
(6.5 KiB) Downloaded 233 times
Martin

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: Gas light flicker

Post by RobH »

That's perfect guys. Thanks. I'll play with those files an see how bad I can break them. ;)

Post Reply