Cov txheej txheem:

Tsis siv neeg pob-pov rau dev: 6 Kauj Ruam
Tsis siv neeg pob-pov rau dev: 6 Kauj Ruam

Video: Tsis siv neeg pob-pov rau dev: 6 Kauj Ruam

Video: Tsis siv neeg pob-pov rau dev: 6 Kauj Ruam
Video: Koj Hais Dab Tsi?/Suabci Kwm & Ab Meej Ham/Official MV 2023 2024, Kaum ib hlis
Anonim
Tsis siv neeg pob-pov rau dev
Tsis siv neeg pob-pov rau dev

Peb ob leeg muaj dev, thiab raws li txhua tus paub, dev tuaj yeem siv sijhawm txhua hnub ua si pob. Tias yog vim li cas, peb tau xav txog txoj hauv kev los tsim lub foob pob tsis siv neeg

Kauj Ruam 1: Cov ntaub ntawv rau Circuit

Cov ntaub ntawv rau Circuit
Cov ntaub ntawv rau Circuit

Ua ntej tshaj plaws, los tsim hluav taws xob ib feem ntawm txoj haujlwm peb xav tau cov hauv qab no:

Ib daim ntawv arduino

Ob lub cav servo

Kev tiv thaiv ntawm 1 ohm

Ib tug photoresistor

Ib pawg PCB

Cov neeg dhia

Kauj ruam 2: Tsim Circuit Court

Tsim Circuit Court
Tsim Circuit Court

Txhawm rau tsim cov khoom siv hluav taws xob, cov khoom siv yuav tsum txuas nrog, hauv qhov no tus photoresistor thiab ob tus neeg pabcuam, tsim nyog raws li hauv av hauv av thiab kab uas muab cov ntsia hlau.

Kauj Ruam 3: Cov Khoom Ua Haujlwm Li Cas

Kev ua haujlwm ntawm cov khoom yog cov hauv qab no:

Thaum tus dev tawm pob hauv lub thoob, tus kws yees duab pom tias muaj lub teeb pom kev tsawg dua, tom qab ntawd servomotor 1 tso "catapult" thiab tso lub pob. Thaum lub pob twb tau muab pov tseg lawm, servomotor 2 txav "catapult" mus rau qhov chaw pib, thiab thaum kawg, servomotor1 tuav nws, thiaj li yuav tuaj yeem ua tib lub zog yav tom ntej.

Kauj ruam 4: Txoj Cai

#suav nrog

int photoresistor = A0; Kev pabcuam servo_9; Kev pabcuam servo_8;

int photoresistor tus nqi; int pos1 = 0; int pos2 = 0;

void teeb tsa () {

servo_9.attach (9); servo_8.attach (8); Serial.begin (9600); }

void voj () {

int photoresistorvalue = analogRead (photoresistor); Serial.println (photoresistor tus nqi); yog (photoresistorvalue <150) {// rau (pos1 = 0; pos1 <= 90; pos1 += 1) {servo_9.write (90); ncua (2000);

// rau (pos2 = 0; pos2 <= 90; pos2 += 1) {servo_8.write (100); ncua (2000);

// rau (pos1 = 90; pos1 <= 0; pos1 -= 1) {servo_9.write (0); ncua (2000);

// rau (pos2 = 90; pos2 <= 0; pos2 -= 1) {servo_8.write (0); ncua (2000); }}

Kauj Ruam 5: Cov Ntaub Ntawv rau Tus Qauv thiab Nws Tsim

Cov ntaub ntawv rau Tus Qauv thiab Nws Tsim
Cov ntaub ntawv rau Tus Qauv thiab Nws Tsim

Txog kev tsim cov qauv peb tau siv peb daim ntawv A4 ntawm tus tsiaj, thiab peb txiav cov duab no nrog lub tshuab txiav laser kom tau txais txhua daim ntawm peb cov qauv.

Ob ntawm nplooj ntawv yog lub hauv paus thiab kev txhawb nqa ntawm cov qauv. Cov ntawv uas muaj tus lej 1 tau muab tso rau hauv lub hauv paus los ua qhov chaw nruab nrab ntawm thawj daim ntawv thiab thib ob uas yuav tso cai tso tag nrho cov arduino thiab cov khoom siv hluav taws xob.

Txhawm rau tsim cov catapult peb xav tau daim 2, 3 thiab 4. Cov lej thib ob, lawv tau lo rau hauv lub hauv paus, thiab tuav thiab tso cai rau tig ntawm catapult. Qhov ntev tshaj plaws yog tus qauv tseem ceeb ntawm catapult, daim ntawv 3 yog lo rau qhov kawg ntawm catapult, ib puag ncig ib puag ncig qhov chaw uas tus kws thaij duab yuav mus, tuav lub pob hauv qhov chaw ntawd.

Tus lej 5 daim yog rau servos, kom lawv mus txog qhov chaw ntxiv thiab tso cai rau ua nws txoj haujlwm zoo dua.

Tam sim no peb muaj tag nrho cov qauv yuav luag tiav peb yuav tsum muab cov hlua roj hmab uas yuav tsim qhov nro tsim nyog rau kev txhaj tshuaj. (Nws yog ib qho tseem ceeb yuav tau ceev faj nrog cov hlua roj hmab vim tias yog cov nqaj tsis muaj zog txaus, thiab cov khoom tawg yooj yim, cov qauv yuav tawg.)

Kauj Ruam 6: Cov Khoom Kawg

Khoom Kawg
Khoom Kawg

Nov yog peb cov khoom kawg.

Vam tias koj nyiam nws!

Pom zoo: