Introduction: Tissue Box

This tissue box is not just any tissue box. This tissue box will remind you to refill the tissue box when there are only a few tissues left in the box. There are three different colors of light. The green light means there are still a lot of tissues left in the box. The yellow light means there are only a few left in the box and should be refilled. The blue light is when the amount left in the box somewhere between green and yellow light. I made this tissue box because there were lots of times when I want to take tissue from the box, there were none left in the box. Because the box is not transparent, it is hard to tell how much is left without opening the box. But with this device, it will remind you to refill the tissue box and make sure that there is always enough tissue in the box.

Supplies

1 tissue box

1 Arduino (Uno/ Leonardo) + their wire

3 white LEDs

1 green LED

1 yellow LED

1 blue LED

2 breadboards

1 electrical resistance (820Ω)

1 photoresistor

18 wires

Tape (non-transparent)

Step 1: Connecting Everything

Step 2: Tape Them on to the Tissue Box

Tape the Arduino board to the bottom of the tissue box. Cover all the lights on the board with tape.

Tape the green, blue, and yellow LED lights close to the opening of the tissue box.

Tape the three white lights on the top of the box close to the side.

Tape the photoresistor right under the three white lights when the box is closed.

Tape the wires to the sides of the box.

Step 3: Code

void CL(){
    digitalWrite( 6 , LOW );
    digitalWrite( 7 , LOW );
    digitalWrite( 8 , LOW );
}
void setup()
{
    CL();
    Serial.begin(9600);
    pinMode( 6 , OUTPUT);
    pinMode( 7 , OUTPUT);
    pinMode( 8 , OUTPUT);
}
int s = 0;
int e = 730, q = 900;</p><p>void loop()
{
    if ( analogRead( A0 ) > q-2 && s != 1 )
    {
        delay( 400 );
        if ( analogRead( A0 ) > q-2 )
        {
            CL();
            digitalWrite( 8 , HIGH );
            s=1;
        }
    }
    else if ( analogRead( A0 ) < q+2 && analogRead( A0 ) > e-2 && s != 2 )
    {
        delay( 400 );
        if ( analogRead( A0 ) < q+2 && analogRead( A0 ) > e-2 )
        {
            CL();
            digitalWrite( 7 , HIGH );
            s=2;
        }
    }
    else if ( analogRead( A0 ) < e+2 && s != 3)
    {
        delay( 1000 );
        if ( analogRead( A0 ) < e+2 )
        {
            CL();
            digitalWrite( 6 , HIGH );
            s=3;
        }
    }
    Serial.print(analogRead( A0 ));
    Serial.print(" ");
    Serial.println();
    delay( 200 );
</p>}

This is my code. "e" and "q" can be changed to change when will the green or yellow lights turn on.

Step 4: Finish

The last step, put tissue un the tissue box.

Here is the video of my tissue box.