Arduino Project9
Arduino Project9
Project 9
LED Fire Effect
54
Earthshine Design Arduino Starters Kit Manual - A Complete Beginners Guide to the Arduino
Connect it up
Now press the Verify/Compile button at the top of the
Now, first make sure that your Arduino is powered off. IDE to make sure there are no errors in your code. If
You can do this either by unplugging the USB cable or this is successful you can now click the Upload button
by taking out the Power Selector Jumper on the to upload the code to your Arduino.
Arduino board. Then connect everything up like this :-
If you have done everything right you should now see
the LEDʼs flickering in a random manner to simulate a
flame or fire effect.
So letʼs take a look at the code for this project. First The main loop then starts again causing the flicker
we declare and initialise some integer variables that light effect you can see.
will hold the values for the Digital Pins we are going to
connect our LEDʼs to. Bounce the light off a white card or a mirror onto your
wall and you will see a very realistic flame effect.
int ledPin1 = 9;
int ledPin2 = 10; As the hardware is simple and we should understand
int ledPin3 = 11; it by now we will jump right into Project 10.
Exercises
56