Project tutorial

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

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

  • 1,202 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

Smart Energy Saver for Your Home

Project tutorial by Dhairya Parikh

  • 2,065 views
  • 8 comments
  • 11 respects

Simple Water Quality Analysis

Project showcase by Wen-Liang Lin

  • 6,416 views
  • 5 comments
  • 9 respects

Secure Your Logins with Biometrics

Project tutorial by Amal Mathew

  • 1,697 views
  • 0 comments
  • 7 respects

Chicken Coop Automation

Project in progress by BMic

  • 5,473 views
  • 9 comments
  • 16 respects

First Project - Arduino+Blynk

Project tutorial by Vijay Shreenivos

  • 863 views
  • 1 comment
  • 6 respects

Little Rover

Project tutorial by Jeremie

  • 971 views
  • 0 comments
  • 8 respects
Add projectSign up / Login