The Remote Controlled Stop Light

Introduction: The Remote Controlled Stop Light

This Stop Light gets controlled by a remote.1 is Red,2 is Yellow and 3 is Green. Use this for races or your tournaments.The stop light will stay on one color for 5 seconds.If you push 1 you have to wait 5 seconds to push the next.

Supplies

Red Led

Green Led

Yellow Led

Wires

Receiver

Remote

220 Resistors

Arduino

3D Printer

Hot Glue Gun

Step 1: Printing

First Print The Stop Light and Hot Glue the 3 Pieces together.Next put paper or Plastic over the coverings,

Step 2: Wiring

Next Complete the Wiring shown in the Pictures.The Resistors are 220.Here is the Code that you will need for the Arduino.

#include <IRremote.h>

//Define Pins

int redLed = 5;

int yellowLed = 4;

int greenLed = 3;

int RECV_PIN = 11;

//IR Library stuff

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()

{

//Set Led Pins

pinMode(redLed, OUTPUT);

pinMode(yellowLed, OUTPUT);

pinMode(greenLed, OUTPUT);

//Enable serial usage and IR signal in

Serial.begin(9600);

Serial.println("Enabling IRin");

irrecv.enableIRIn();

Serial.println("Enabled IRin");

}

void loop() {

if (irrecv.decode(&results)) {//irrecv.decode(&results) returns true if anything is recieved, and stores info in varible results

unsigned int value = results.value; //Get the value of results as an unsigned int, so we can use switch case Serial.println(value);

switch (value) {

case 2295:

digitalWrite(redLed, HIGH);

delay(10000);

digitalWrite(redLed, LOW);

break;

case 34935:

digitalWrite(yellowLed, HIGH);

delay(10000);

digitalWrite(yellowLed, LOW);

break;

case 18615:

digitalWrite(greenLed, HIGH);

delay(10000);

digitalWrite(greenLed, LOW);

break; }

irrecv.resume(); // Receive the next value } }

Step 3: Testing

Next test it with your remote and point it at the receiver.

Lighting Challenge

Participated in the
Lighting Challenge

Be the First to Share

    Recommendations

    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Fandom Contest

      Fandom Contest
    • First Time Author Contest

      First Time Author Contest

    2 Comments

    0
    skuzzybear
    skuzzybear

    Question 11 months ago on Step 1

    Hey. Thanks for this light instructable
    Quick question... I may have missed it BUT I need a light that goes for three, two minutes and one minute
    Is it just the timer to change or do I need something else? Thanks heaps
    Janine

    0
    Max 24
    Max 24

    Answer 11 months ago

    Its just the time to change.