3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

LED Pumpkin Light controlled by Arduino

LED Pumpkin Light controlled by Arduino
The initial vision for the project was to set up an LED to turn on and off by itself based on ambient light, and to flicker and vary intensity to simulate a candle.

Parts required:
1 x Arduino
1 x LED (preferably a bright amber one for realism)
1 x LDR (Light dependent resistor)
1 x 1000 ohm resistor
1 x 220 ohm resistor


 
Remove these adsRemove these ads by Signing Up
 

Step 1Carve a Pumpkin

Carve a Pumpkin
Carve a pumpkin
« Previous StepDownload PDFView All StepsNext Step »
5 comments
Aug 23, 2011. 10:34 AMwirenut1980 says:

Give this a try


// flickering LED
int ledPin = 11; // asign LED to pin 11
void setup() // setting things up
{
pinMode(ledPin, OUTPUT); // sets pin 11 to output
}
void loop() // starting loop
{
analogWrite(ledPin, random(50)+255); // outputs a random brightness between 206 and 255 on a scale of 255
delay(random(100)); // maintains that brightness for a random interval between 1 and 100 milliseconds
}
Oct 12, 2009. 9:17 PMfungus amungus says:
You should also enter this in the Arduino contest.
Oct 9, 2009. 2:56 PMrivetgeek says:
Im a little confused why you have additional resistors in the project?  The arduino has built in resistors for leds

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
65
Followers
5
Author:Sky-Monkey
I have a never-ending desire to try new things, build stuff, experiment, and learn. I don't really watch TV, or play video games - I prefer to get my entertainment from physically interacting with the...
more »