Cov txheej txheem:

Hugging Robot: 5 Kauj Ruam
Hugging Robot: 5 Kauj Ruam

Video: Hugging Robot: 5 Kauj Ruam

Video: Hugging Robot: 5 Kauj Ruam
Video: 5 Community clip humbling 2024, Kaum ib hlis
Anonim
Hugging Neeg Hlau
Hugging Neeg Hlau

Tsis muaj dab tsi zoo dua li puag thaum koj nyob ib leeg kho siab khuav. Qhov Arduino powered neeg hlau ua tiav qhov kev xav tau no yam tsis xav tau tib neeg.

Kauj Ruam 1: Noj pizza ntau

Peb tsim peb cov neeg hlau tawm ntawm cov thawv pizza, tab sis ib daim duab los yog ntoo yuav ua. Koj xav tau lub cev los txuas caj npab rau, thiab ib txoj hauv kev kom cov neeg hlau sawv ntsug. Peb tau sawv ntawm ntoo.

Kauj Ruam 2: Txuas caj npab rau Rope, thiab Rope rau Tov Khoom

Txuas caj npab rau hlua, thiab Hlua rau Tov Khoom
Txuas caj npab rau hlua, thiab Hlua rau Tov Khoom
Txuas caj npab rau hlua, thiab Hlua rau Tov Khoom
Txuas caj npab rau hlua, thiab Hlua rau Tov Khoom
Txuas caj npab rau hlua, thiab Hlua rau Tov Khoom
Txuas caj npab rau hlua, thiab Hlua rau Tov Khoom

Cov caj npab ntawm peb cov neeg hlau yog siv los ntawm cov khoom sib tov qub, uas yog kaw rau hauv paus.

Kauj Ruam 3: Muab Ob LEDs tso rau hauv Pinpong Balls

Muab Ob LEDs hauv Pinpong Balls
Muab Ob LEDs hauv Pinpong Balls

cov kauj ruam no hais lus rau nws tus kheej.

Kauj Ruam 4: Txuas lub Sensor, Txuas thiab LEDs mus rau Arduino

Txuas lub Sensor, Kev Tshaj Tawm thiab LEDs rau Arduino
Txuas lub Sensor, Kev Tshaj Tawm thiab LEDs rau Arduino

Tus neeg hlau tau qhib los ntawm tus kws yees duab. Lub Arduino mam li qhia qhov xa tawm, uas qhib lub tov khoom. Nyob rau tib lub sijhawm LEDs hauv qhov muag tau qhib.

Kauj ruam 5: Code

Txoj cai rau txoj haujlwm no yooj yim heev. Peb tsuas yog siv peb tus pin Arduino: ib qho kev sib piv rau lub photoresistor (A0), qhov tso tawm rau lub cev muaj zog (11), thiab ib qho tso tawm rau LEDs (9). Txij li tus neeg hlau tsis tuaj yeem rov pib dua nws tus kheej, Arduino tsis tas yuav yog. Tom qab tus neeg hlau tau qhib, Arduino tsuas yog xaus rau qhov ncua ntev heev uas muab sijhawm txaus los rov pib dua nws tus kheej los ntawm kev thawb lub pob.

teeb tsa tsis muaj dab tsi () {pinMode (11, OUTPUT); pinMode (A0, INPUT); pinMode (9, NTAWV); }

void voj () {

int tus nqi = analogRead (A0); yog (tus nqi

Pom zoo: