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.

Arduino-Powered Pumpkin

Arduino-Powered Pumpkin
This Halloween project uses an Arduino with a proximity sensor and a bunch of LEDs to greet guests at your doorstep.

 
Remove these adsRemove these ads by Signing Up
 

Step 1Program the Arduino and hook it up

Program the Arduino and hook it up
The code for this is based on an example from Tom Igoe's Making Things Talk. It's pretty simple: the Arduino monitors a Sharp GP2D12 Infrared ranger, and if it detects movement nearby, it turns all the LEDs up to maximum brightness. While it's waiting for someone to step close to it, the Arduino flickers the lights.

Pins 9, 10, and 11 go to LEDs that are shown in the next step. Analog pin 0 goes to the proximity sensor. Power and ground go to the breadboard that houses the LEDs and the sensor.

The attached file, Pumpkin.pde, contains the Arduino code you need to upload to your Arduino.
« Previous StepDownload PDFView All StepsNext Step »
6 comments
Feb 10, 2009. 6:30 PMgeeklord says:
cool. So does the rangefinder have an analog output of a varying voltage?
i think thats right
Nov 12, 2008. 7:13 AMrolandl says:
Hook up 12 LEDs to the 12 IO pins. Control them from the keyboard of your linux system, or write a script to turn them on/off in some pattern. Use cron or similar to change the script periodically. See http://user.cavenet.com/rolandl and get the package, SMS1.tgz. Now with GUI via xdialog command.
Feb 10, 2008. 10:51 AMcr0ybot says:
Added to Arduino Group! ;D
Feb 5, 2008. 6:06 PMflio191 says:
a pathway with these on either side, lined up (would essentially be a lot of work, but) would be really cool! The lights would turn on as you pass them!
Nov 3, 2007. 10:03 PMalvincredible says:
hey thats cool! and if it probably saves alot of energy too cause its off when no ones near it. good idea
Nov 1, 2007. 1:18 PMHawaii00000 says:
How about you make millions of these put them around youe door and wire them to your doorbell so that when it i rung they all turn on and your surrounded but glowing jack-o-lanterns about to eat you alive!!!!! Alright forget the eat you alive business.

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!
4
Followers
3
Author:bjepson
I'm an editor for Make and a geek for AS220. I like to hack code and things.