Introduction: Sleep Light, by Ian and Barrett

About: Projects made by students in Ms. Lamm's engineering class at Portland High School.

This project will allow you to change the color of a sleeping light using an Arduino relay. It can be done by anyone so you should give it a try!

Supplies

You will need:

Wires

Alligator clips

Diode

Transistor

Relay

1K Ohm resistor

Arduino Uno board

Lamb Sleep Light

Step 1: Build the Circuit

The first step is to make the circuit on your bread board and then connect it to the Arduino. Follow this circuit diagram to crate it.

Step 2: Open the Toy

The next step is to open the toy and connect it to the Arduino. You will first need to cut the lamb part off of the toy. Then open it and cut the wire that connects to the light button. In this case it is the red wire.

Step 3: Conect It to the Arduino

Next you need to connect it to the Arduino. Cut and strip the wire that connects to the light button. Then clip them with the alligator clips to the circuit. It does not matter witch wire they clip to.

Step 4: The Code

The last step is to upload the code and watch the light change. Make sure your circuit is built correctly before you upload the code.

int Relay = 13;

// the setup routine runs once when you press reset:

void setup() {

// initialize the digital pin as an output.

pinMode(Relay, OUTPUT);

}

// the loop routine runs over and over again forever:

void loop() {

digitalWrite(Relay, HIGH);

delay(1000);

digitalWrite(Relay, LOW);

delay(1000);

Step 5: