Cov txheej txheem:

BLE Page Turner 2.0: 3 Cov Kauj Ruam
BLE Page Turner 2.0: 3 Cov Kauj Ruam

Video: BLE Page Turner 2.0: 3 Cov Kauj Ruam

Video: BLE Page Turner 2.0: 3 Cov Kauj Ruam
Video: Lil Nas X, Jack Harlow - INDUSTRY BABY (Official Video) 2024, Kaum ib hlis
Anonim
BLE Page Turner 2.0
BLE Page Turner 2.0

Kuv txiv tsis ntev los no tau yuav lub bluetooth foot pedal uas ua rau nws muaj nws cov nkauj nkauj ntawm lub ntsiav tshuaj thiab tig nplooj ntawv nrog nws txhais taw. Muaj txiaj ntsig zoo rau ob daim ntawv nkauj thiab PDF Lego cov lus qhia, uas yog ob qho ntawm ob qho kuv nyiam yav dhau los, thiab txawm tias kuv xav muaj ib qho ntawm kuv tus kheej, Kuv tsis tau npaj siab them 80 €.

Kuv pib nrhiav DIY cov haujlwm los ua kuv tus kheej. Ceev nrooj, kuv dawm li qhov qhia los ntawm "Peakecentral" siv Adafruit Bluefruit EZ-Key ua raws nraim qhov kuv xav tau. Teeb meem yog tias Adafruit cov khoom tsis muaj nyob lawm. Kuv xav tau lwm yam ntxiv.

Tshawb nrhiav lub vev xaib Kuv pom tias ESP8266 tus ua tiav (ESP32) muaj kev txhawb nqa BLE. Yog thaum kuv txiav txim siab mus rau nws. Kuv xaj ob daim ESP32 cov phiaj xwm txhim kho (ESP-Wroom-32) thiab pib ua qauv. Qhov tshwm sim yog pawg thawj coj pom ntawm nplooj ntawv tom ntej, nrog rau daim duab qhia chaw.

Khoom siv

Kuv siv BOM tsim los ntawm Peakecentral, uas suav nrog khawm khawm uas kuv siv los ua khawm rov pib dua. Ob lub zog thiab rov pib khawm tau teeb tsa hauv LEDs, uas kuv tau siv los qhia seb lub pob raug nias (piv txwv li lub zog tau qhib lossis pib dua yog ua tiav:

  • casing, muaj tswv yim
  • 1 ESP32
  • Arduino IDE nrog ESP32 pawg thawj coj thiab BLE HID tsev qiv ntawv npaj (nyeem)
  • 1 16mm OD SPST hloov, latching, nrog xiav LED (SW2)
  • 1 12mm OD SPST hloov, ib ntus, nrog liab LED (SW1)
  • 2 lub sijhawm hloov pauv hloov pauv (SW3 & SW4)
  • 1 PP3 roj teeb txuas
  • 1 PP3 roj teeb
  • 21k0 tiv
  • stranded hookup hlau
  • roj hmab daim kab xev los tiv thaiv zawv zawg

Kauj ruam 1: Prototyping

Prototyping
Prototyping
Prototyping
Prototyping
Prototyping
Prototyping

Kuv siv ob lub sijhawm hloov pauv thiab ob lub hloov pauv uas muaj LED nyob hauv. Nws coj kuv qee lub sijhawm los txiav txim siab yuav siv cov LEDs li kuv xav li cas. Peb muaj ob lub LEDs. Ib qho yuav pom kev thaum ESP32 yog khau raj, nws mam li tua thiab yuav pom kev sai li sai tau thaum muaj kev sib txuas ntawm bluetooth. Nws txuas nrog IO13. Lwm qhov LED txuas nrog khawm rov pib dua thiab yuav ci thaum lub pob nyem. Yog li qhia rau koj paub yog tias khawm pib dua tau nias kom raug. Thaum xub thawj, kuv xav tsis thoob vim li cas tus tiv thaiv tau txuas nrog ntawm qhov hloov pauv, txuas hauv av rau khawm. Yog li ntawd, kuv tau hais meej ib ntu ntawm daim duab rau koj kom pom meej txog kev sib txuas ntawm tus neeg tso npe rau ob qho tib si LED thiab hauv av.

Kauj ruam 2: Software

Software
Software

Nrog tus qauv nyob hauv qhov chaw, cia peb pib nrog software ib feem ntawm txoj haujlwm. Thaum pib, peb xav teeb tsa ob lub khawm rau nplooj ntawv tig (nce-xub thiab nqes xub) thiab khawm thib peb rau rov pib dua. Tom qab ntawd, peb xav kom cov coj ntawm lub hwj chim-khawm qhib thaum lub cuab yeej siv hluav taws xob, dua li tua nws sai, thiab thaum kawg qhib nws thaum lub cuab yeej txuas nrog.

Kuv kho cov ntawv kuv googled piv txwv ntawm ESP32 HID. Piv txwv ntawm https://www.hackster.io/user0448083246/esp32-ble-h… nrog gamepad muaj plaub lub khawm npaj txhij, txawm tias kuv tsuas xav tau ob qho xwb. Kuv hloov kho software me ntsis kom haum rau kuv cov kev xav tau. Daim duab IDE tuaj yeem rub tawm los ntawm nplooj ntawv no.

Kauj Ruam 3: Teeb Kho Vajtse

Kho vajtse teeb
Kho vajtse teeb

Txog rau qhov kev qhia no, Kuv xav tias koj muaj qee qhov txuj ci ua haujlwm. Thov tshuaj xyuas daim duab hluav taws xob los tsim pcb me me kom yooj yim rau xaim. Kuv tau siv PCB nrog me me (3 qhov rau ib 'kob'), Kuv tau siv cov xov hlau ntawm PCB. Thaum kawg, ESP32 tau muag. Nco ntsoov siv cov khoom ruaj khov uas tuaj yeem tiv taus koj txhais taw los ntawm nws. Tsis tas li, xav txog kev daws teeb meem los tiv thaiv nws los ntawm kev swb hauv qab koj txhais taw.

Txog tam sim no, Kuv tau siv kuv lub pedal ntawm ib lub roj teeb 9v, thiab nws tseem muaj zog.

Hmoov zoo! Thov tawm koj cov ntawv thiab cov lus pom hauv qab no.

Pom zoo: