Pages: [1]   Go Down
Author Topic: halloween costume  (Read 1225 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
like I know what I'm doing...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I made a helmet for my halloween costume out of a 5 gallon paint bucket, some LED's, an Arduino, and an off the shelf voice changer.  


Youtube is here: http://youtube.com/watch?v=u-D-eURrRtU

Basically: it's 12 LEDs wired in parallel and connected to a digital output on the Arduino board.  I used the setup from the knock tutorial but modified the code slightly.  

Code:
/* Modified Knock Sensor
 * Original by DojoDave <http://www.0j0.org>
 * Modified for use in a halloween costume by Spain [removed serial info, delay, and added if-else]
 * Uses a piezo element as a sound detector to turn LEDs on and off
 *
 * Original can be found at:
 * http://www.arduino.cc/en/Tutorial/Knock
 */

int ledPin = 12;      // leds connected in sequence to control pin 12
int knockSensor = 5;  // the knock sensor will be plugged at analog pin 5
byte val = 0;         // variable to store the value read from the sensor pin
int statePin = LOW;   // variable used to store the last LED status, to toggle the light
int THRESHOLD = 10;  // threshold value to decide when the detected sound is a knock or not

void setup() {
 pinMode(ledPin, OUTPUT); // declare the ledPin as as OUTPUT
}

void loop() {
  val = analogRead(knockSensor);    // read the sensor and store it in the variable "val"
  if (val >= THRESHOLD) {
    digitalWrite(ledPin, HIGH); // Turn LED on if above threshhold
  }
  else {
    digitalWrite(ledPin, LOW); // Turn LED off if NOT above threshhold
  }
}

If I had more time:
- I would have looked into using the arduino as a voice changer, or else made one out of a kit, rather than using one off the shelf from a big box store
- I would have made the eyes flicker when I spoke also (as it is they are connected to a separate 9v battery)

Thanks to DojoDave for the code, and for forum members nkcelectronics and Cheater for helping me figure out how to solder PC board!  
Logged

watch me break things! http://krylon.blogspot.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 26
like I know what I'm doing...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For some reason the "edit" link isn't showing up.  Either way: picture of it being worn:  


Logged

watch me break things! http://krylon.blogspot.com

Tønsberg, Norway
Offline Offline
Full Member
***
Karma: 0
Posts: 148
Arduino rocks hard!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Man, that is SO cool! Fairly simple, yet oh-so-awesome! You could perhaps do something more to the "helmet".. you know.. to make the bucket more helmety. But dang, always a pleasure when someone comes up with something mindpokingly fun like this! Thanks for the inspiration! ^^ Gonna go home from work in an hour, pick up my brand new ultrasound-rangers and lasermodule from Sparkfun and totally geek out! B-D
Logged

Dreaming of extra senses through sensory substitution/agumentation since.. well, for ever.. =P
Going to automate my home, just gotta find the perfect DIY solution first!

Pages: [1]   Go Up
Jump to: