Cov txheej txheem:

Laser Anti-tub sab ntaus ntawv: 4 Cov kauj ruam
Laser Anti-tub sab ntaus ntawv: 4 Cov kauj ruam

Video: Laser Anti-tub sab ntaus ntawv: 4 Cov kauj ruam

Video: Laser Anti-tub sab ntaus ntawv: 4 Cov kauj ruam
Video: Nkauj mos ab ib txhia tub sab 7/25/2018 2024, Kaum ib hlis
Anonim
Laser Anti-tub sab ntaus ntawv
Laser Anti-tub sab ntaus ntawv

Muaj ntau tus tub sab nyiam mus rau lwm tus neeg lub tsev thiab nyiag lawv cov khoom uas muaj txiaj ntsig heev thaum cov neeg tsaug zog, yog li kuv tsim lub cuab yeej no los daws qhov teeb meem no.

Khoom siv

lub thawv loj*1

lub thawv me*1

tsis kam*3

daim ntawv tsis muaj daim nplaum*1

Arduino Leonardo*1

Piezo buzzer*1

hlau*20≤

Cov cuab yeej los txiav thiab muab tshuaj txhuam*1≤

Laser taw qhia*3

Photoresistance*3

A4 ntawv loj*1

Kauj Ruam 1: Txuas Cov Khoom Siv

Txuas cov Cheebtsam
Txuas cov Cheebtsam
Txuas cov Cheebtsam
Txuas cov Cheebtsam

Muab tag nrho cov khoom siv hauv lawv qhov chaw raws li daim duab saum toj no

Kauj ruam 2: Ntaus Code

tsis muaj teeb tsa teeb tsa () {// muab koj cov cai teeb tsa ntawm no, kom khiav ib zaug: Serial.begin (9600); // qhib qhov chaw nres nkoj, teev cov ntaub ntawv tus nqi rau 9600 bps} tsis muaj dab tsi voj () {// muab koj cov cai tseem ceeb ntawm no, kom rov ua dua: Serial.print (analogRead (A2)); // luam cov lus Serial.print (""); // luam tawm Serial.println (); yog (analogRead (A2) <700) {rau (int i = 0; i <10; ++ i) {tone (11, 1976, 200); // buzzer lossis hais lus zaus ncua (300); // tos ob peb milliseconds laus (11, 1976, 200); // buzzer lossis hais lus zaus ncua (600); // tos ob peb milliseconds}} Serial.print (analogRead (A3)); // luam cov lus Serial.print (""); // luam tawm Serial.println (); yog (analogRead (A3) <550) {rau (int i = 0; i <10; ++ i) {tone (11, 1976, 200); // buzzer lossis hais lus zaus ncua (300); // tos ob peb milliseconds laus (11, 1976, 200); // buzzer lossis hais lus zaus ncua (600); // tos ob peb milliseconds}} Serial.print (analogRead (A1)); // luam cov lus Serial.print (""); // luam tawm Serial.println (); yog (analogRead (A1) <800) {rau (int i = 0; i <10; ++ i) {tone (11, 1976, 200); // buzzer lossis hais lus zaus ncua (300); // tos ob peb milliseconds laus (11, 1976, 200); // buzzer lossis hais lus zaus ncua (600); // tos ob peb milliseconds}}

Kauj ruam 3:

Duab
Duab
Duab
Duab
Duab
Duab

1. Kaw ob lub thawv

2. Muab tag nrho cov khoom siv ntawm lawv qhov chaw raws li daim duab

3. Xeem nws

Kauj ruam 4: Pros thiab Cons

Pros:

1. Nws daws qhov teeb meem

2. nws nyuaj dua rau cov tub sab nyiag koj cov khoom thaum koj tsaug zog

3. Nws yuav pab cov neeg uas nyob hauv cov tsev me me thiab cia lawv kawm paub tiv thaiv tub sab.

Cons:

1. Nws tsuas ua haujlwm thaum koj nyob hauv tsev

2. Nws tsis muaj txiaj ntsig thaum koj tsis nyob hauv tsev

Pom zoo: