Phone Controller Arduino

Introduction: Phone Controller Arduino

This phone controller can help you to prevent using the phone when you're doing homework or project.

The phone controller I made will make "beeeep" sound after you turn on the switch. I used the ultrasonic sensor to detect if the phone is on the machine or not. When you finish your work, you could just turn off the switch, then you can play with your phone.



1. Arduino Leonardo

2. Breadboard

3. Jumper wire

4. Speaker

5. Switch

6. Cardboard

7. Cable

8. Hot glue gun

9. Tape

10. Ultrasonic sensor

Step 1: Step 1: Connect Your Switch to the Breadboard

Step 2: Step 2: Upload Your Codes to Leonardo

void setup()

{ pinMode( 2 , INPUT); digitalWrite( 12 , LOW ); //connect the switch to the breadboard

pinMode( ardublockUltrasonicSensorCodeAutoGeneratedReturnCM( 12 , 11 ) , INPUT); } //the ultrasonic sensor make sure the pgone is on it

void loop() { if (digitalRead( 2 )) { if (digitalRead( ardublockUltrasonicSensorCodeAutoGeneratedReturnCM( 12 , 11 ) )) { tone(8, 1318.0, 1000.0); } } else { } } // the speaker to make beep sound

Step 3: Step 3: Make the Box of It

1. find a cardboard

2. cut it into the size that Arduino board could fit in

3. Tape the jump wire onto the board so it won't be so messy. (inside the box)

4. cut out four holes for the switch, cable and the ultrasonic sensor

5. use the hot glue gun to stick the parts of the box together

Step 4: Step 4: Start the Machine, Get Away From Phone!!

Be the First to Share


    • Puzzles Challenge

      Puzzles Challenge
    • CNC and 3D Printing Contest

      CNC and 3D Printing Contest
    • Rice & Grains Challenge

      Rice & Grains Challenge



    3 years ago

    So you did not explain what stops the phone working?

    Penolopy Bulnick
    Penolopy Bulnick

    3 years ago

    It's nice to be able to get rid of distractions like this :)