Author: Elvis Yang

I made the Automatic Night Light named as SWIMCLOUD. It would detect the darkness and lights up by itself when people turn off the lights, so I do not need to turn on the night light by myself and do not need to afraid the darkness anymore.

However, I used the transparent acrylic to build my model because of inspiration by below these photos. I think if I let people know what is the mechanism inside, and how it works, and it might raise the curious of this products and make it different from the common night light.

Then I laser cut the components which I want to build my model and used acrylic adhesive to stick it together.

For the circuit, I used the PIR sensor to detect the darkness on the Arduino board. And put cotton in the transparent cylinder to diffuse the lights, and make some change to let the lights suitable for the environment when people sleep.

Below are my screenshot and videos of homework this week. Due to the day off last week, I spent some time to figure out how this works. But I think it all goes well right now, and I am excited to utilize the new widgets to my final project!

GoodNight could detect the darkness of surroundings, so if I turn off the light, it will light up itself and show the time on the surfaces. So I do not need to turn on the other night light.

My second idea is a small fan. And it could detect the concentration of Carbon Dioxide in the house. If the Carbon Dioxide concentration is too high, and it would turn on the fan automatically. So I do not need to open the door after I cooked.

The last idea is the simple toys for play. When I throw something onto the 9×9 board, and the board which is impacted would light up and show the scores. So when people stress out could play this game with their friends or classmates.

Actually, I used paper to diffuse the light, but when the parade, the costumes from other people are too bright and the effective of the lightsaber is not that much good. So I pull out the paper in the parade.

My first idea for Halloween outfit is the devil mask, there are some scars on its surface, and the eyes I will use LED to change the brightness.

My second idea is wearing the mask and have one light sword which can change the color. But I still figuring out where to put the circuits things is better.

The third idea is the robot BB8, and I will make a robot shape and put the LED inside its eyes, and change the color. And when I wear on it, it can rotate the head side, so make it more like a real robot.

His name is Target Monster because of his body shape, so he was used as bowling before.
And now he is used as Target, I thought it is much better than bowling one, he always feels bad so his face always like this.

Actually, sometimes I will feel uncomfortable to sleep in the whole dark place, but now I can light up this Target Monster and put it beside my bed, and I will get more comfortable when I sleeping!

// constants won't change. They're used here to set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int led = 9; // the number of the LED pin
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(led, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
analogWrite(led, brightness);
// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;
// reverse the direction of the fading at the ends of the fade:
if (brightness = 255) {
fadeAmount = -fadeAmount;
}
// wait for 30 milliseconds to see the dimming effect
delay(15);
} else {
// turn LED off:
analogWrite(led, brightness);
// change the brightness for next time through the loop:
brightness = brightness + fadeAmount;
// reverse the direction of the fading at the ends of the fade:
if (brightness = 255) {
fadeAmount = -fadeAmount;
}
// wait for 30 milliseconds to see the dimming effect
delay(50);
}
}