Cov txheej txheem:

Arduino-Powered Neeg Hlau Tswj Nrog Tactigon: 5 Kauj Ruam
Arduino-Powered Neeg Hlau Tswj Nrog Tactigon: 5 Kauj Ruam

Video: Arduino-Powered Neeg Hlau Tswj Nrog Tactigon: 5 Kauj Ruam

Video: Arduino-Powered Neeg Hlau Tswj Nrog Tactigon: 5 Kauj Ruam
Video: Arduino DC Motor Control Tutorial - L298N | H-Bridge | PWM | Robot Car 2024, Kaum ib hlis
Anonim

Los ntawm Tactigon Saib peb qhov projectFollow More los ntawm tus sau:

Yuav Ua Li Cas Ua Arduino Faire Strength Test
Yuav Ua Li Cas Ua Arduino Faire Strength Test
Yuav Ua Li Cas Ua Arduino Faire Strength Test
Yuav Ua Li Cas Ua Arduino Faire Strength Test
Yuav Ua Li Cas Txuas 3D Tshuab Luam Ntawv rau AR Tsom iav
Yuav Ua Li Cas Txuas 3D Tshuab Luam Ntawv rau AR Tsom iav
Yuav Ua Li Cas Txuas 3D Tshuab Luam Ntawv rau AR Tsom iav
Yuav Ua Li Cas Txuas 3D Tshuab Luam Ntawv rau AR Tsom iav
Yuav Ua Li Cas Tswj Teeb Los Ntawm Gesture
Yuav Ua Li Cas Tswj Teeb Los Ntawm Gesture
Yuav Ua Li Cas Tswj Teeb Los Ntawm Gesture
Yuav Ua Li Cas Tswj Teeb Los Ntawm Gesture

Hais txog: TACTIGON SKIN yog tus tswj lub ntsej muag nrog cov txuj ci dag ntxias dag ntxias thiab cov cim ntawm lub rooj tsavxwm, uas daws qhov tsis ua haujlwm ntawm lub cuab yeej ib txwm thaum sib cuam tshuam nrog cov tshuab. KEY POINTS:… Ntau Ntxiv Txog Tactigon »

Txheej txheem cej luam

Kab ntawv no yuav qhia yuav ua li cas thiaj li ua tau zoo ntawm Tactigon's BLE Central peev xwm. Peb xav tswj peb cov neeg hlau los ntawm kev siv Lub Tactigon ua "3D lub kauj tsheb" tswj kev nrawm nrog lub suab thiab lub kauj nrog yob. Peb tau hloov pauv tsawg hauv Alphabot2 thawj tus qauv Bluetooth piv txwv thiab sau ib daim duab rau Lub Tactigon txhawm rau txuas rau tus neeg hlau tus yam ntxwv BLE thiab sau hauv lub log nrawm.

Kauj Ruam 1: Yam Peb Xav Tau

Lub Tactigon nrog kev teeb tsa Arduino IDE Neeg Hlau. Peb siv 2 lub log neeg hlau nrog Arduino board thiab BLE xov tooj cua cuam tshuam nrog UART. Lwm hom neeg hlau lossis cov cai tuaj yeem ua haujlwm ib yam. Neeg Hlau BLE MAC Chaw Nyob thiab Yam Ntxim Saib Ntxim Ua

Kauj Ruam 2: Sau BLE MAC Chaw Nyob thiab Tus Cwj Pwm

Sib sau BLE MAC Chaw Nyob thiab Tus Cwj Pwm
Sib sau BLE MAC Chaw Nyob thiab Tus Cwj Pwm
Sib sau BLE MAC Chaw Nyob thiab Tus Cwj Pwm
Sib sau BLE MAC Chaw Nyob thiab Tus Cwj Pwm
Sib sau BLE MAC Chaw Nyob thiab Tus Cwj Pwm
Sib sau BLE MAC Chaw Nyob thiab Tus Cwj Pwm

Tom qab peb ib puag ncig tau teeb tsa thiab peb cov laug cam tau qhib, peb yuav tsum sib sau BLE MAC Chaw Nyob thiab Tus Cwj Pwm. Txhawm rau ua li ntawd peb siv daim ntawv thov dawb hauv Android hu ua BLE Scanner.

Ob peb feeb tom qab daim ntawv thov yuav tsum qhia tus neeg hlau BLE:

Raws li peb pom, txhua yam khoom siv BLE ib puag ncig peb tau pom nyob hauv ntu no. Peb yuav tsum sau Waveshare_BLE MAC chaw nyob: hauv qhov piv txwv no nws yog: 00: 0E: 0B: 0C: 4A: 00 Los ntawm kev nyem rau khawm Txuas peb nkag mus rau lub cuab yeej cov ntaub ntawv raws li tus yam ntxwv, kev pabcuam thiab tus yam ntxwv tshwj xeeb.

Ntawm no peb yuav tsum sau CUSTOM CHARACTERISTIC UUID, hauv qhov no: 0000ffe1-0000-1000-8000-00805f9b34fb. Nrog cov khoom no peb tuaj yeem teeb tsa peb Tactigon BLE los ua BLE Central hauv kev teeb tsa () ntu ntawm txoj cai.

Kauj Ruam 3: Tactigon Sketch

Tactigon Sketch
Tactigon Sketch
Tactigon Sketch
Tactigon Sketch
Tactigon Sketch
Tactigon Sketch
Tactigon Sketch
Tactigon Sketch

voj ()

Hauv seem no peb muaj lub hauv paus ntawm daim duab. Ntawm qhov zaus ntawm 50Hz, peb hloov kho quaternions thiab cov ntsiab lus tsis txaus ntseeg.

Analizyng lub kaum sab xis muab los ntawm Tactigon lub tsev qiv ntawv, peb tuaj yeem txiav txim siab lub kauj voos los ntawm kev qeeb lub log sab hauv thiab ua kom lub log sab nrawm dua.

Kev txheeb xyuas yob, hloov pauv, peb tuaj yeem txiav txim siab kev mus los ntawm tus neeg hlau.

Nrog tus sprintf peb npaj qhov tsis los sau rau hauv tus yam ntxwv.

Kauj ruam 4: Neeg Hlau kos duab

Neeg Hlau kos duab
Neeg Hlau kos duab
Neeg Hlau kos duab
Neeg Hlau kos duab
Neeg Hlau kos duab
Neeg Hlau kos duab
Neeg Hlau kos duab
Neeg Hlau kos duab

Txij li thaum peb Bluetooth xa tau txais cov ntaub ntawv hla UART, peb tau txais lub log nrawm hauv qhov tsis raug. Peb tau teeb tsa tus neeg hlau pins raws li hauv qab no, txhua yam raws li qhov tsim tawm:

Txhawm rau cais cov lus txib peb xub nyeem tag nrho cov ntawv tsis raug thiab txheeb xyuas yog tias nws ntev dua 0:

Yog tias cov lus txib muaj "Wh" peb tuaj yeem txheeb xyuas txoj hlua thiab sib sau ua ke Sab laug thiab sab xis.

Kev ua haujlwm direct_motor muab qhov nrawm kis los ntawm Lub Tactigon rau txhua lub log ntawm tus neeg hlau. Los ntawm kev ua li ntawd Lub Tactigon yuav ua raws li lub log tiag tiag!

Kauj Ruam 5: Kev Txiav Txim Kawg

Cov duab kos no qhia tau tias muaj peev xwm thov ntawm Tactigon, nrog BLE Central hom tuaj yeem txuas rau BLE cov cuab yeej uas twb muaj lawm thiab sau cov ntaub ntawv lossis tswj hwm lawv. Nyob twj ywm kom paub ntau ntxiv Tactigon tus lej!

Pom zoo: