Cov txheej txheem:

Hnab looj tes nas Wireless: 6 Kauj Ruam
Hnab looj tes nas Wireless: 6 Kauj Ruam

Video: Hnab looj tes nas Wireless: 6 Kauj Ruam

Video: Hnab looj tes nas Wireless: 6 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Hlis ntuj nqeg
Anonim
Hnab looj tes nas Wireless
Hnab looj tes nas Wireless

Cov Lus Qhia no yog rau kuv qhov haujlwm kawg rau chav kawm Wearble Technologies ntawm University of Colorado Boulder. Lub hom phiaj ntawm txoj haujlwm no yog ua kom nas tsis siv lub tshuab Bluetooth. Lub hom phiaj tseem ceeb ntawm txoj haujlwm yog ua kom cov nas no hnav tau siv hnab looj tes. Lub ntsej muag tsis zoo ntawm lub hnab looj tes ua rau nws nyiam rau cov nyiam ua haujlwm.

Yog li, los ntawm kev ua kom nws hnav tau tus neeg siv yuav tsum muaj peev xwm siv nas tau yooj yim. Tus nas muaj cov haujlwm hauv qab no.

  • Nyem Nyem
  • Txoj Cai Nyem
  • Nyem ob npaug
  • Cursor Movement
  • Screen Capture

Kauj Ruam 1: Yuav Tsum Tau Kho Vaj Huam Sib Luag

Yuav Tsum Tau Kho Vajtse
Yuav Tsum Tau Kho Vajtse
Yuav Tsum Tau Kho Vajtse
Yuav Tsum Tau Kho Vajtse
Yuav Tsum Tau Kho Vajtse
Yuav Tsum Tau Kho Vajtse

Nram qab no yog cov khoom xav tau los tsim txoj haujlwm no

  • Raspberry Pi 3 B+
  • LIS3DH 3-Axis Accelerometer
  • RIght/Sab tes Hnab looj tes
  • Jumer Wires F/F thiab M/F.
  • Nias khawm
  • Txiv neej Headers
  • Laptop

Kauj ruam 2: Teeb Kho Vajtse

Teeb Kho Vajtse
Teeb Kho Vajtse
Teeb Kho Vajtse
Teeb Kho Vajtse
Teeb Kho Vajtse
Teeb Kho Vajtse

Txhawm rau teeb tsa kho vajtse rau txoj haujlwm no thov ua raws cov theem no.

  1. Txhawm rau khau raj koj Raspberry Pi, thov ua raws qhov txuas no los tsim daim npav SD bootable.
  2. Test koj Pi
  3. Solder tus accelerometer nrog Txiv neej header pins. Xaws lub accelerometer nrog lub hnab looj tes raws li qhia hauv daim duab. Twist cov xov hlau nyob rau hauv txoj kev taw qhia raws lub moos uas yuav ua rau cov khoom zoo thiab huv.
  4. Txhawm rau ua cov hnab looj tes ua raws cov theem no.

    • Khaws hnab looj tes sab hauv tawm
    • Siv snap khawm lossis M/F jumber xov hlau. Xaws cov xov tooj jumber nrog lub hnab looj tes raws li qhia hauv daim duab.
    • Txuas cov xov hlau txuas mus rau Pi GPIO tus pin headers.
    • Twist cov xov hlau.
  5. Thaum kawg, xaws Pi nrog koj lub hnab looj tes.

Ib tus tuaj yeem siv khawm khawm thiab cov xov coj ua kom ua rau cov khoom lag luam zoo dua thiab hnav tau yooj yim. Vim yog qhov xwm txheej tam sim no thiab tsis muaj peev xwm ua tau ntawm cov khoom siv sib txuas uas siv cov khawm khawm thiab cov khoom siv tsis tuaj yeem siv tau.

Kauj Ruam 3: Txuas Koj Cov Khoos Phis Tawj

Txuas Koj Cov Khoos Phis Tawj
Txuas Koj Cov Khoos Phis Tawj
Txuas Koj Cov Khoos Phis Tawj
Txuas Koj Cov Khoos Phis Tawj

Txuas lub Accelerometer

Txhawm rau xaim acceleromter nrog Raspberry Pi peb yuav tsum paub tus lej ua haujlwm ntawm tus pin xav tau ntawm Pi thiab tus ntsuas nrawm.

Follw qhov txuas no kom koj tus kheej paub nrog tus lej ua haujlwm ntawm pi.

Txog tus neeg saib xyuas lub ntsej muag ua tib zoo saib kom tsis muaj teeb meem txhua tus lej ua haujlwm.

Nov yog tus pin qhia rau peb cov accelerometer thiab RPi. Siv F/F jumber xov hlau rau koj qhov kev sib txuas.

Accelerometer Pin - RPi Pin

GND Hauv av

VCC 3V3 Hwj chim (1)

SDA BCM2 (SDA)

SCL BCM3 (SCL)

Cov hlua khawm Snap/Jumper Wires

Cov nyees khawm khawm/jumper xov hlau yog siv txhawm rau txhawm rau txheeb xyuas qhov nyem ntawm nas khawm. Raws li peb yuav siv plaub tus ntiv tes thiab tus ntiv tes xoo ntawm no yog tus pin qhia kom ua tiav cov haujlwm uas xav tau.

Thumb Wire 3V3 Fais Fab (17)

Index ntiv tes BCM4

Ntiv tes nruab nrab BCM17

Ntiv Nplhaib BCM27

Pinky Finer BCM22

Yuav ua li cas qhov kev sib txuas saum toj no yuav ua haujlwm txhawm rau txheeb xyuas qhov nyem? Txhawm rau txhawm rau txheeb xyuas nas nyem, tus neeg siv yuav tsum kov tus ntiv tes nrog tus ntiv tes xoo. Thaum qhov kev sib txuas ua tiav RPi yuav txheeb xyuas qhov cuam tshuam ntawm tus pin thiab nas kev ua yuav tshwm sim los ntawm kev xa cov lus txib tsim nyog ntawm bluetooth.

Kauj Ruam 4: Txhim Kho Software

Txhawm rau ua kom koj lub khoos phis tawj ua haujlwm, koj yuav tsum sau cov software. Txoj haujlwm no suav nrog ua raws cov software loj.

  1. Cov neeg siv Bluetooth
  2. Bluetooth neeg rau zaub mov
  3. Kev sib xyaw Accelerometer
  4. Nas ua

Hauv peb qhov haujlwm, hnab looj tes nas ua haujlwm zoo li tus neeg siv bluetooth thaum lub khoos phis tawj yuav ua haujlwm li bluetooth server. Peb yuav siv RFCOMM tus yam ntxwv ntawm Bluetooth los sib tham nrog cov neeg siv khoom thiab cov neeg siv khoom.

Ib feem ntawm tus neeg siv bluetooth kuj tseem muaj lub ntsuas qhov ntsuas kom ua ke txhawm rau txheeb xyuas cov nas txav. Txhua feem tau tham txog luv luv hauv cov theem hauv qab no.

Kauj Ruam 5: Hnab looj tes nas - Bluetooth Client Software

Hnab looj tes nas - Bluetooth Client Software
Hnab looj tes nas - Bluetooth Client Software
Hnab looj tes nas - Bluetooth Client Software
Hnab looj tes nas - Bluetooth Client Software
Hnab looj tes nas - Bluetooth Client Software
Hnab looj tes nas - Bluetooth Client Software
Hnab looj tes nas - Bluetooth Client Software
Hnab looj tes nas - Bluetooth Client Software

Cov cai hauv daim duab saum toj no tsim kev sib txuas nrog tus neeg rau zaub mov.

uuid: yog tus ID ntawm cov kev pabcuam bluetooth uas peb yuav siv

addr: yog qhov chaw nyob ntawm tus neeg rau zaub mov piv txwv li chaw nyob bluetooth (MAC chaw nyob) ntawm koj lub laptop.

Peb cov neeg rau zaub mov yuav txuas ntxiv txuas ntxiv hauv kev tshaj tawm. Cov ntaub ntawv tshaj tawm yuav muaj cov kev pabcuam ID, tus lej chaw nres nkoj, lub npe pabcuam thiab chaw nyob.

Thaum pom peb sim txuas mus rau qhov chaw nyob pom thiab tus lej chaw nres nkoj.

Hauv lwm cov duab, zoo li koj tuaj yeem pom, peb tab tom siv Pi GPIOs teeb tsa thiab nyeem tus lej/tus lej xov tooj txhawm rau txheeb xyuas tus ntiv tes twg raug nias thiab ua raws li xa xov mus rau tus neeg rau zaub mov.

Hauv qab no yog kev txhais ntawm eahc ntiv tes nias.

Index Finger Mouse Left Click

Middle Finger Mouse Right Click

Ntiv ntiv tes nas Ob npaug nias

Pinky Finger Screen Capture (Duab yuav raug khaws cia ncaj qha hauv cov npe tam sim no)

Kauj Ruam 6: Laptop - Bluetooth Server Software

Laptop - Bluetooth Server Software
Laptop - Bluetooth Server Software
Laptop - Bluetooth Server Software
Laptop - Bluetooth Server Software

Txhawm rau txhim kho software rau server, koj lub khoos phis tawj yuav tsum tau khiav ntawm Ubuntu Linux OS. Nram qab no yog kev vam khom xav tau txhawm rau ua kom software ua haujlwm raws li xav tau. Ua raws cov kab ntawv txuas rau cov lus qhia rau nruab lawv.

  • Bluez
  • pybluez
  • pyautogui

Raws li koj tuaj yeem pom hauv cov duab saum toj no, peb tab tom qhib qhov chaw nres nkoj rau kev sib txuas lus thiab tom qab ntawd pib tshaj tawm ntawm kev pabcuam bluetooth.

Thaum tus neeg siv txuas nrog lub software txuas ntxiv mus tshuaj xyuas cov khoom xa tuaj thiab ua qhov yuav tsum tau ua.

Pom zoo: