Cov txheej txheem:

Kev Taw Qhia Lub Tsheb MPU6050 thiab NRF24L01: 4 Cov Kauj Ruam
Kev Taw Qhia Lub Tsheb MPU6050 thiab NRF24L01: 4 Cov Kauj Ruam

Video: Kev Taw Qhia Lub Tsheb MPU6050 thiab NRF24L01: 4 Cov Kauj Ruam

Video: Kev Taw Qhia Lub Tsheb MPU6050 thiab NRF24L01: 4 Cov Kauj Ruam
Video: qhia kev saib kau taw qaib 2024, Lub Xya hli ntuj
Anonim

Kev tswj hwm tus neeg hlau ua haujlwm lub ntsej muag yog hom kev ua haujlwm uas nyiam los ntawm cov neeg nyiam ua haujlwm. Lub tswv yim tom qab nws yog qhov yooj yim: kev taw qhia ntawm xib teg tswj kev txav ntawm lub tsheb neeg hlau. MPU6050 kom paub txog kev taw qhia ntawm lub dab teg thiab xa nws mus rau arduino hauv tus nqi. Tus nqi ntau yog los ntawm -32768 txog +32767 rau txhua lub axis. Module raws li NRF24L01 nti muaj ob txoj kev sib txuas lus ntawm 2.4GHz band. Lub rooj tsav xwm hauv Circuit Court muaj lub kav hlau txais xov txuas nrog. Tus qauv sib txuas lus nrog microcontrollers ntawm SPI siv. Qhov ntau ntawm cov qauv no hauv txoj kev xav yog txog li 100 meters. Ib qho ntxiv, koj tuaj yeem tswj lub zog ntawm lub tshuab xa hluav taws xob kom txo kev siv hluav taws xob. Cov motors raug tswj los ntawm L298N module siv los ntawm rau rau AA / R6 roj teeb.

Kauj Ruam 1: Sau Cov Ntsiab Lus

Cov Ntsiab Lus
Cov Ntsiab Lus

Kauj ruam 2: Schema Transmitter thiab Code

Schema Transmitter thiab Code
Schema Transmitter thiab Code

Sketch DOWNLOAD

Kauj ruam 3: Schema Txais thiab Code

Schema Txais thiab Code
Schema Txais thiab Code

Sketch DOWNLOAD

Kauj ruam 4: Kho

Tom qab xa cov duab kos mus rau arduinos, txuas tus txais rau lub khoos phis tawj thiab qhib SERIAL MONITOR. Qhib lub transmitter thiab pom koj pom qhov tseem ceeb ntawm X axis thiab Y axis. Tam sim no teeb tus nqi rau txhua qhov kev taw qhia ntawm kev mus ncig. STOP tus nqi: yog tias FORWARD tus nqi yog AcX 6000. Tus nqi STOP yuav yog qhov nruab nrab ntawm cov txiaj ntsig no AcX -6000.

Ua tib yam rau Y axis. Yog tias koj tau txais tam sim no tau teeb tsa zoo, tshem tawm daim ntawv no thiab xa cov program.

// DELETE // -------------------------------

Serial.print ("AcX:");

Serial.print (ACX);

Serial.print ("");

Serial.print ("AcY:");

Serial.print (ACY);

ncua (300);

// -----------------------------

Pom zoo: