Josh From BreakoutBros.com
Published © CC BY-NC

Remote Controlled Jack-o-Lantern

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

BeginnerFull instructions provided30 minutes3,120
Remote Controlled Jack-o-Lantern

Things used in this project

Story

Read more

Code

Code snippet #1

C/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 
      }
}

Credits

Josh From BreakoutBros.com

Josh From BreakoutBros.com

14 projects • 88 followers
At BreakoutBros we try to be a link between electronics designers and hobbyists. We make electronics tinkering easy for everyone but teach professional methods.

Comments