Phone Controller Arduino

by jocelyn.chiang in Workshop > Tools

247 Views, 0 Favorites, 0 Comments

Phone Controller Arduino

Arduino phone controller

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.

Supplies

Materials:

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: Connect Your Switch to the Breadboard

IMG_9006.jpg

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: Make the Box of It

IMG_9010.jpg
IMG_9011.jpg
IMG_8991.jpg

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: Start the Machine, Get Away From Phone!!

13C3AB6C-41FB-49F1-B61F-FA5F2634C92B.jpg