Arduino Phone Detector

by Itzlit17 in Circuits > Arduino

1173 Views, 0 Favorites, 0 Comments

Arduino Phone Detector

Arduino 3.jpeg

Usually, parents are not allowing their children to be on their phones all the time, even some of the parents would take away their phones. However, some clever kids would steal the phone back without anyone noticing. Therefore, the Arduino Phone Detector is for the parents, whenever the phone is gone, the box will lit up, so the children will not be able to get away easily, since the parents may see the blue lights.

Supplies

x1 光敏電阻

x2 Led 燈

x12 電線

x1 Arduino 板

Assemble the Parts

Arduino 2.jpeg
截圖 2021-05-21 下午9.31.03.png

Places the led lights and the wires to the correct coordinate

Then Check if any wires are attached to the wrong point

Arduino Program

void setup(){

Serial.begin(9600);

pinMode( 12 , OUTPUT);

pinMode( 11 , OUTPUT);

}

void loop(){

Serial.print(analogRead( A0 ));

Serial.print(" ");

Serial.println();

delay( 20 );

if ( analogRead( A0 ) > 500 ) { //改
digitalWrite( 12 , HIGH );

}

else {

digitalWrite( 12 , LOW );

}

Serial.print(analogRead( A0 ));

Serial.print(" ");

Serial.println();

if ( analogRead( A0 ) > 500 ) // 改

{

digitalWrite( 11 , HIGH );

Video N' Photos

Arduino Phone Dectector
Arduino 4.jpeg
Arduino 1.jpeg

Credits

-Mr. David Huang's wonderful Arduino program / Arduino Class

-Instructables