Introduction: Deal With It Eye Shield (for Vision Adaptation When Waking Up)

Major problem:

When we wake up from sleep and our friend turns on the room light, most of us are instantly blinded by the lights because our eyes need time to adjust from a dark environment to a bright one. What are we going to do if we want to solve this problem of getting blinded? We "deal with it". This project (machine), Deal With It, is able to detect a sudden change in brightness, and it lowers a black plastic board in front of your eyes when the room lights turn on, giving you ten seconds for your eyes to adapt slowly without getting blinded. How do I use it? The black plastic board of Deal With It is attached to the end of a rotating arm, which would rotate 180 degrees when stimulated by a sudden brightening. When you are about to sleep, lie down, put Deal With It to the right of your head, elevate the machine so the pedal doesn't hit your face when activated, and adjust position of the machine so that the sunglasses shaped pedal covers your eyes when the machine is activated.

How do I use it?

The black plastic board of Deal With It is attached to the end of a rotating arm, which would rotate 180 degrees when stimulated by a sudden brightening. When you are about to sleep, lie down, put Deal With It to the left (or right if you manipulate the code) of your head, elevate the machine so the pedal doesn't hit your face when activated, and adjust position of the machine so that the sunglasses shaped pedal covers your eyes when the machine is activated.

Supplies

To start dealing with it, here's what you need

-1 shoe box with lid attached to the box on one side (lid height: 5.5 cm, width excluding lid: 18.9 cm, width including lid: 19.5 cm, height: 11 cm, length excluding lid: 28.7 cm, length including lid: 29.4 cm)

-1 measuring tape

-1 Arduino Leonardo (Get it at: https://store.arduino.cc/usa/leonardo)

-1 Breadboard and jumpers (Get those at: https://store.arduino.cc/usa/breadboard-830)

-1 photoresistor (Get it at: https://www.adafruit.com/product/161)

-1 1K ohm resistor (Get those at: https://www.amazon.com/Ohm-Carbon-Film-Resistors-Pack/dp/B06WP1NDH7)

-1 Parallax Standard Servo (Get it at: https://www.parallax.com/product/900-00005)

-1 USB breadboard external plug in

-Male to female Dupont cables (Get those at: https://www.amazon.com/Male-Female-Jumper-Wire-20cm/dp/B00F3T2H86)

-wrapping paper (at least 58cm x 58cm)

-A4 papers (and printer)

-1 roll of tape

-1 Box cutter (Get the preferable type at: https://www.amazon.com/Shop-1220-knives-box-handle-heavy-retractable/dp/B073WLWB7G)

-2 black plastic boards (30cm x 20cm)

-Arduino USB cable (Get it at: https://chosentech.info/product/usb%E6%96%B9%E9%A0...)

-1 USB Power Bank

Step 1: The Circuit

Build up the circuit of Deal With It according to the figure above

IMPORTANT: DO NOT PLUG IN USB POWER SUPPLY, PHOTORESISTOR, AND SERVO YET, BUT SAVE SPACE FOR THEM.

Step 2: Cutting Out the Skin of the Box

Cut along the black lines and draw along the red lines according to the figure above.

THE RED LINES WOULD BE ON THE INSIDE OF THE BOX'S SKIN WHEN THE MACHINE IS FINISHED.

Step 3: Put the "base" Board Under Box

IMPORTANT: MAKE SURE THAT THE HAND DRAWN LINES ARE FACING UPWARDS AND ALIGN WITH THE EDGE OF THE BASE OF THE BOX.

Step 4: Tape the Wings Onto the Box

Step 5: Sides

Lay the box on its side

Open up the lid

Put the "side" board onto the box's side, 3 cm wide wing facing the opening of the box, red lines facing the box, bordering the perimeter of the box's side.

Step 6: Tape the 1 Cm Wide Wings of the "side" Board Onto the Box

Step 7: Fold the 3 Cm Wide Wing of the "side" Board Into the Interior of the Box and Tape It

REPEAT ALL THE SIDE BOARD STEPS ABOVE FOR THE OTHER SIDE OF THE BOX AND THE OTHER SIDE BOARD.

Step 8: Tape the "front" Board Onto the Front of the Box by Its Edges

Step 9: Tape the "back" Board Onto the Back of the Box Along Its Edges

Step 10: The Bottom Board

Open up the box and lay it on its lid. The lid should be placed on top of the "top" board, its edges aligning the largest drawn grid in the board, the board's 5.7 cm wing pointing at the end of the lid, while the board's 1 cm wing should be facing the attached part between the lid and the box's body.

Step 11: Fold the Wing on the Side Into the Interior of the Box's Cover Hood and Tape It to the Hood

Do the same for the other side wing.

Step 12: Tape the Wing at the Lid's Edge Onto the Lid

Step 13: Sit the Box Right Side Up and Close the Lid of It

Step 14: Tape the Ear-like Wings to the Side of the Box's Lid Hood

Step 15: Tape the 1cm Wing of the Top Board to the Back of the Box

Step 16: Tape Your Arduino Leonardo to the Top Right Corner in Your Shoe Box, Shoe Box Facing the Direction As Shown in the Picture

Step 17: Cutting on the Top of the Box

Using the illustration above, on the top of the box's lid, put the servo on the red rectangle and cut along its edges into the box using the box cutter. then, make a nick on the black dot at the bottom, where the photoresistor would subsequently go.

IMPORTANT: MAKE SURE THAT THE OPENING OF THE BOX IS ON THE LEFT WHEN YOU START TO DO THE CUTTING

Step 18: Fit the Servo Into the Rectangular Hole on the Top of the Shoe Box Cable-first in the Direction As Shown in the Picture. Then, Tape the Servo to the Surface of the Box to Make It Sturdy.

Step 19: Tuck the Servo Into Its Position on the Circuit

Step 20: Making a Wire

Link 2 pairs of Dupont cables together in the manner as shown in the picture, and wrap tape around the linking spot to make it sturdy. This wire would be used to connect the photoresistor to your breadboard later.

Step 21: Put Photoresistor in From the Nick You Just Made on the Lid of the Box, and Connect the Wire You Just Made to the Photoresistor's Legs From Under the Lid.

Step 22: Tuck the Photoresistor Into Its Spot on the Circuit

Step 23: Make a Nick, in the Position Indicated on the Drawing, on the Smallest Side of the Box (the Side Below the Photoresistor As Shown in the Photo)

This is where the external USB breadboard power supply cable would go in later.

Step 24: Connect a Pair of Dupont Cables to the External USB Breadboard Power Supply, and Wrap Tape Around the Linking Spots So Its Sturdy.

Step 25: Insert the USB Cable From the Nick on the Side of the Box You've Just Made and Tuck It Into Its Position on the Circuit.

Step 26: Cut Out a 2cm X 30cm Strip From a Black Plastic Board

Step 27: Print Out the "Deal With It" Sunglasses. This Would Be Used As the Paddle That Covers Your Eyes When Actually Operating the Machine.

Step 28: Stack the Paper With the Pixelated Sunglasses on Top of the Other Uncut Black Plastic Board. Cut the Paper Together With the Board Along the Outline of the Pixelated Sunglasses

Step 29: Tape the Paper Sunglasses Onto the Sunglasses Shaped Plastic Board

Step 30: Put This Code Into Your Machine

#include <Servo.h>
Servo servo;
void setup(){
  servo.attach(2);
  servo.write(0);} //resets servo to 0 degrees
void loop(){}

Step 31: Tape the Black Plastic Strip to the Right of the Servo to Form a Rotatable Arm, Like What the Picture Shows.

Step 32: Tape the Glasses at the Tip of the Rotating Arm in the Direction Shown in the Picture

The arm and the glasses should overlap over a distance of approximately a third of the glasses's left lens, with the glasses on top of the arm.

Step 33: Doodle!

Print out and cut out the representative doodle of this machine and tape it onto the machine in the position and the direction shown in the picture.

Step 34: Put This Code Into Your Machine

// This machine works by first detecting the turning off of the lights, and the machine would spin the arm when the lights are turned back on
#include 
Servo servo;
void setup(){
  servo.attach(2);
  servo.write(0);}
void loop(){
  do{delay(1);}while(analogRead(5) > 400); // This number determines how dark the environment should be for the photoresistor to consider the environment as "dark". To make the photoresistor sense brighter brightness as "dark", increase the value in this line, and vice versa.
  do{delay(1);}while(analogRead(5) < 600): // This number determines how bright the environment should be for the photoresistor to interpret that the lights have turned on. To make the photoresistor sense dimmer lights, decrease the value in this line, and vice versa.
  servo.write(180); // This line controls servo movement. Adjust the angle to make the servo turn more or less.
  delay(10000); // This line regulates how long the lens would stay on top of your eyes. The delay is defaultly set to 10 seconds. To make the lens stay longer on top of your eyes, increase the value in this line, and vice versa.
  servo.write(0); // To reverse the movement of the servo, swap the zero in this line with the value in line 10, and change the degree in line 6 to 180.
}

Congrats, you are done!

Step 35: Start "Dealing With It!"