Molly Nicholas
Published © GPL

Halloween project: Blue Girl

IR proximity sensor that lights up LEDs embedded in a Blue Girl painting for a Halloween party.

IntermediateFull instructions provided1,064
Halloween project: Blue Girl

Things used in this project

Hardware components

RADIOSHACK® INFRARED LED EMITTER AND DETECTOR @$3.59
Emitter Specs (tinted package): Reverse voltage: 5VCont.; forward current: 150mA; Forward voltage: 1.3V typical, 1.7V max; Wavelength (peak emission): 950nm Detector Specs (max): IC (collector current)50mA; Peak sensitivity wavelength: 850nm
×1
Resistors: 70 Ohms, and 38 KOhms
×1
SparkFun RedBoard
SparkFun RedBoard
×1

Story

Read more

Schematics

BlueGirl.fzz

Code

file_14083.txt

Plain text
Code
int inputPin = A0; // analog pin 0 is the input pin  
int val = 0; // variable to store the value read 
int redEyes = 8; // turns on the red LED for glowing eyes effect.
int highThreshold = 13;

void setup() { 
  Serial.begin(9600);         // initializing Serial monitor
  pinMode(redEyes, OUTPUT);
} 

void loop() { 

  digitalWrite(redEyes, LOW);
  val = analogRead(InputPin); // read the input pin 0 to 1023 

  Serial.println( val);
  if (val >= high_threshold)
  { 
    digitalWrite(redEyes, HIGH);
    delay(1000);
  } 
   
}

Credits

Molly Nicholas

Molly Nicholas

9 projects • 8 followers
I ran away from the Circus to join Science.

Comments