Project tutorial

Remote Controlled Jack-o-Lantern © CC BY-NC

BreakoutBros Halloween Special: A RF remote controlled Jack-o-Lantern

  • 591 views
  • 0 comments
  • 1 respect

Components and supplies

About this project

We wanted to get into the Halloween spirit at BreakoutBros but we are super busy writing reviews, tutorials, and decorating our houses. While I was testing parts to review the ControlEverything.com Arduino Shield I realized I was just a few spliced wires and a relay away from something fun.

So I combined that shield, the Arduino Light Control Tutorial, a ceramic Jack-o-Lantern, and some wire. The pumpkin I used already had a male plug, so I decided to make a relay controlled outlet. This also made it easy because modern wall outlets have places to simply push in wires. That way I didn’t need to use any wire nuts, just the screw terminals on the relay board. I even used the Normally Closed  terminal on a 2nd relay for the return wire.

To keep my dogs out of the wires, I put all the hardware in a shoebox and plugged in the Arduino and Pumpkin.

In the spirit of keeping it simple I have it come on when the button is pressed and stay on until its released.

Here is the code:

void setup() {
  pinMode(5, OUTPUT);   //Set up the pin for the Relay 
  pinMode(13, OUTPUT); //These two lines turn OFF the buzzer
  digitalWrite(13, LOW);   //The buzzer is rather useful most of the time
}
void loop() {
      if (digitalRead(6) == HIGH)  //check for remote press from the shield
      {
           digitalWrite(5, HIGH);      //Close the relay to turn on the light as long as the button is held
      }
    else
      {
      digitalWrite(5, LOW);     //leave the light OFF otherwise 
      }
}

Even my dog wanted to check out the show.

The great thing about this is how easily expandable it is, you could add a motion or proximity sensor to make it automatic or you could add a speaker and audio shield for a sound effect.

Happy Halloween Everyone.

Code

Code snippet #1C/C++
void setup() {
  pinMode(5, OUTPUT);      //Set up the pin for the Relay 
  pinMode(13, OUTPUT);     //These two lines turn OFF the buzzer
  digitalWrite(13, LOW);   //The buzzer is rather useful most of the time
}

void loop() {
      if (digitalRead(6) == HIGH)      //check for remote press from the shield
      {
           digitalWrite(5, HIGH);      //Close the relay to turn on the light as long as the button is held
      }
    else
      {
      digitalWrite(5, LOW);     //leave the light OFF otherwise 
      }
}

Comments

Similar projects you might like

Development Board for AtTiny MCU

by Vincenzo G.

  • 142 views
  • 0 comments
  • 5 respects

The Magnetic Field and RGB Tester

Project tutorial by Kutluhan Aktar

  • 344 views
  • 0 comments
  • 5 respects

Version 2.0 Advanced Attendance System (Without Ethernet)

Project tutorial by GadgetProgrammers

  • 3,059 views
  • 5 comments
  • 44 respects

Ultrasonic Security System

Project tutorial by Krepak

  • 532 views
  • 2 comments
  • 7 respects

Control LED Using Your Voice Command

by IoTBoys

  • 1,113 views
  • 1 comment
  • 12 respects
Add projectSign up / Login