Loading...

Realistic LED Flickering Flame Effect using an Arduino

63,004 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on May 11, 2009

A very simple setup with very simple code to produce random flickering effects on 2 x yellow and 1 x red LED's. This gives a very realistic fire/flicker flame effect diffused and reflected off a reflective surface.

The effect doesn't show up very well in the video. If you give it a try yourself you will see how effective it is.

p.s. If anyone can explain why so many people in Poland have viewed this video I would be grateful. Thanks.

Here is the code:

// Project 9 - LED Fire Effect
int ledPin1 = 9;
int ledPin2 = 10;
int ledPin3 = 11;

void setup()
{
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
}

void loop()
{
analogWrite(ledPin1, random(120)+135);
analogWrite(ledPin2, random(120)+135);
analogWrite(ledPin3, random(120)+135);
delay(random(100));
}

Loading...

Advertisement
When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...