Cov txheej txheem:

Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj): 3 Cov Kauj Ruam
Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj): 3 Cov Kauj Ruam

Video: Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj): 3 Cov Kauj Ruam

Video: Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj): 3 Cov Kauj Ruam
Video: Security, Privacy, and Safety in the IoT 2024, Hlis ntuj nqeg
Anonim
Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj)
Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj)
Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj)
Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj)
Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj)
Wireless Gamecontroller Nrog Arduino thiab NRF24L01+ (txhawb rau Ib lossis Ob Tus Tswj)

Koj tuaj yeem pom qhov haujlwm tiav los ntawm kuv lub vev xaib (nws yog lus Finnish):

Nov yog cov lus qhia luv luv txog qhov project. Kuv tsuas yog xav qhia nws yog tias ib tus neeg xav tsim nws thiab nyeem tsis tau lus Finnish.

Koj puas tau xav txog kev ua si web-based games nrog koj tus phooj ywg, tab sis daim duab qhia tsis zoo uas koj muaj lub sijhawm nyuaj ua si? Tsis txhob txhawj xeeb, vim tias koj tuaj yeem tsim koj li kev tswj hwm nrog kev cai mappings. Kuv coded tus tswj kom ua raws li USB-keyboard, tab sis koj tuaj yeem siv nws raws li qhov koj xav tau.

Kauj Ruam 1: Qhov Chaw

Qhov
Qhov

Nov yog kho vajtse koj yuav xav tau:

  • 2 pcs ntawm Arduino Pro Mini (ATmega328P lossis lwm yam yuav ua)
  • 2 pcs NRF24L01+ modules rau kev sib txuas lus wireless
  • Arduino Leonardo lossis Arduino Pro Micro (tus txais)
  • 3D luam chassis (txuas hauv qab no rau cov ntawv)
  • ISP programmer lossis USB -> RS232 hloov pauv rau program cov tswj
  • 16 pcs ntawm 20*20 mm khawm
  • 2 pcs ntawm Li-ion roj teeb rau cov tswj (Nco ntsoov CIRCUITS! Nco ntsoov koj tsis xav tua koj tus kheej! Kuv pom zoo TP4056-board uas muaj USB-charing thiab tiv thaiv hauv tib lub rooj tsavxwm!)
  • 2 pcs ntawm cov swb me me (qee yam zoo li SS12D00G3)
  • Ntau cov xov hlau
  • Dupont connectors (yeem)

Koj tuaj yeem pom Fusion 360 tus qauv los ntawm no:

Kauj ruam 2: Coding

Tom qab ntawd tsuas yog teeb tsa cov tswj (gamecontroller_dualcontroller.ino rau cov tswj yog tias koj xav siv ob tus tswj thiab gamecontroller.ino yog tias koj xav siv tsuas yog ib qho) thiab tus txais (gamecontroller_dual_receiver_w_keystrokes.ino rau ob thiab gamecontroller_receiver_w_keystrokes rau ib qho nkaus xwb)

Txawm li cas los xij koj yuav tsum muab cov tswj chaw nyob sib txawv. Tsuas yog qhib radioLink.ino thiab hloov kab 22 rau thawj tus tswj rau qhov no: radio.openWritingPipe (chaw nyob [0]);

Thiab rau tus tswj thib ob rau qhov no: radio.openWritingPipe (chaw nyob [1]);

Yog tias koj xav hloov daim duab qhia chaw, hloov pauv daim phiaj [8] array (lossis mapping2 [8] rau tus tswj thib ob).

Koj tuaj yeem pom cov lej los ntawm kuv GitHub:

Kauj ruam 3: Sib dhos

Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke

Yuav ua li cas los ua ke tus tswj:

  1. Ntxiv cov khoom sib txuas uas tsim nyog rau kev them nqi hluav taws xob (thiab hloov mus kaw nws)
  2. Kaw cov kab hluav taws xob them mus rau hauv qab
  3. Ntxiv qhov hloov thiab lo rau hauv qhov chaw
  4. solder NRF24L01+ rau Arduino (CE rau tus pin 7 thiab CSN rau tus pin 8)
  5. Txuas cov nyees khawm (lwm tus pin rau hauv av thiab lwm qhov sib txuas I/O tus pin, koj tsis tas yuav xav tau cov capacitors)
  6. Kaw qhov thaiv

Yuav ua li cas los ua ke tus txais:

  1. Txuas NRF24L01+ mus rau Arduino
  2. Koj ua tiav

Pom zoo: