Cov txheej txheem:
- Kauj ruam 1: Nruab Bootloader ntawm Pawg Tswj Xyuas Kev Loj Hlob
- Kauj ruam 2: Teeb Arduino IDE
- Kauj Ruam 3: Nruab CapacitiveController Sketch
- Kauj Ruam 4: Kev Sib Txuas thiab Khawm
Video: $ 3 Lwm Yam rau Makey Makey: 4 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Makey Makey yog lub cuab yeej me me uas ua raws li USB keyboard thiab tso cai rau koj ua cov yuam sij tawm ntawm ib qho khoom me me (txhuas ntawv ci, txiv tsawb, ua khob noom cookie, thiab lwm yam), uas tom qab ntawd tuaj yeem siv los ua tus tswj hwm rau kev ua si thiab kev kawm txuj ci. Makey Makey muaj ob qho kev poob qis: (1) tus nqi thiab (2) xav tau kev sib txuas hauv av.
Txoj haujlwm no yog qhov kev xaiv pheej yig siv $ 2 STM32F1 lub rooj tsavxwm thiab kev paub lub peev xwm. Nws tsuas muaj 10 qhov kev tawm tsam uas tsis zoo rau Makey Makey's 12, tab sis nws muaj qhov zoo uas ntxiv rau kev ua raws cov keyboard, nws tuaj yeem ua raws li USB gamepad maub los (digital joystick).
Qhov:
- "ntsiav tshuaj dub" STM32F103c8 board ($ 1.90 ntawm Aliexpress; xav paub ntau ntxiv ntawm no)
- lub rooj noj mov (tsawg dua $ 1 ntawm Aliexpress) thiab cov xov hlau txuas; lossis tsuas yog pawg poj niam-rau-txiv neej dupont txuas ($ 0.70 ntawm Aliexpress rau pob ntawm 40)
- cov ntawv kaw, cov nab kuab, thiab lwm yam.
Cov Cuab Yeej:
- khoos phis tawj
- UART-rau-USB adapter rau thawj lub phiaj xwm phiaj xwm (Arduino Uno lossis Mega yuav ua txoj haujlwm, ib yam li chav tsev pheej yig CH340)
- soldering hlau rau cov laug lub taub hau rau lub rooj tsavxwm (koj tseem tuaj yeem siv cov pawg ntawm cov ntawv ntsuas tsis tau siv cov laug, tab sis qee zaum lawv poob tawm)
Lub software yog qhov piv txwv piv nrog kuv ADCTouchSensor lub tsev qiv ntawv uas tso cai rau kev nkag siab lub peev xwm nrog tus lej nkaus xwb ntawm STM32F1 pawg thawj coj saib ib lub sensor (nws yog raws martin2250 lub tsev qiv ntawv rau AVR).
Lus ceeb toom: Hauv huab cua qhuav, lossis qhov teeb meem zoo li cas (piv txwv li, ntawm cov ntaub pua plag), tsis txhob kov cov hlau sib txuas kom tsis txhob ua rau hluav taws xob puas rau STM32F1 pawg thawj coj. Kuv cia siab tias qhov tsis kam ntawm qos yaj ywm, txiv tsawb, ua khob noom cookie, thiab lwm yam yuav pab tiv thaiv lub rooj tsavxwm, tab sis yog tias koj siv cov ntawv ci liab qab, koj yuav muaj teeb meem. Ntawm qhov tod tes, pawg thawj coj tsuas yog $ 1.90.
Lub tswv yim kev ua ub no:
- Kev sim kom paub seb yam khoom twg yog tus coj thiab tuaj yeem siv ua chaw tswj hwm. (Piv txwv li, xaum xaum xaum xim xaum; ua si khob noom cookie tswm ciab.)
- Sau Scratch games uas siv tus tswj tsev.
- Hloov kho tus lej Arduino txhawb txoj haujlwm kom tso tus nas nyem/txav mus, lwm tus yuam sij, ntau dua plaub txoj kev qhia rau joystick, thiab lwm yam.
Kauj ruam 1: Nruab Bootloader ntawm Pawg Tswj Xyuas Kev Loj Hlob
Muab ob lub taub hau peb tus pin tso rau hauv nruab nrab ntawm Black Pill txoj kev txhim kho (B0-/center/B0+; B1-/center/B1+), thiab lub taub hau ntev raws ntug (yog tias koj maj nrawm, lossis xav tau kom zam tau cov koob tsis tsim nyog uas yuav ua rau cov menyuam tsis meej pem, koj tsuas yog xav tau tus pin rau A0-A10 thiab G).
Koj xav tau UART rau USB tus choj uas sib xws nrog 3.3v khoom siv. Koj tuaj yeem xaj ch340 los ntawm Aliexpress rau $ 0.66, tab sis kuv muaj Arduino Mega knockoff zaum ib puag ncig, thiab muaj qhov ua kom txias kuv pom hauv online. Yog tias ntawm Arduino koj luv tus pin rov pib dua rau hauv av nrog cov xov hlau luv, tom qab ntawd nws dhau los ua UART rau USB choj-tsis xav tau kos duab. Tsuas yog kev dag yog tias RX thiab TX daim ntawv lo tau thim rov qab: Arduino's "RX" tus pin kis thiab nws "TX" tus pin tau txais. Arduino khiav ntawm 5v thiab Cov Tshuaj Dub ntawm 3.3v, tab sis PA9 thiab PA10 tus pin ntawm stm32f103 yog 5V zam raws li, yog li ntawd yuav tsum tsis muaj teeb meem.
Ntawm lub taub hau uas koj tau siv, muab lub jumper los ntawm B0+ mus rau hauv nruab nrab thiab los ntawm B1- rau nruab nrab.
Ua cov kev sib txuas hauv qab no:
- PA9 rau UART tus choj RX ("TX" yog tias koj siv Arduino dag)
- PA10 rau UART tus choj TX ("RX" yog tias koj siv Arduino dag)
- G rau UART choj av
Koj tuaj yeem siv daim ntawv ci, lossis txiv neej-rau-poj niam dhia, lossis yog tias koj xav ua nws ua ntej koj muab lub taub hau tso, koj tuaj yeem siv cov ntawv xeem (raws li hauv daim duab).
Rub tawm lub bootloader binary. Koj xav generic_boot20_pb12.bin.
Ntawm Windows, teeb tsa ST's Flash Loader Demonstrator. Ntawm Linux (thiab tej zaum OS X thiab txawm tias Windows yog tias koj xav tau cov cuab yeej siv kab lus), siv cov ntawv nab nab no hloov, tab sis kuv cov lus qhia yuav yog rau Windows. Txuas koj tus choj UART rau koj lub khoos phis tawj.
Fais fab Ntsiav Tshuaj Dub ntawm nws lub USB chaw nres nkoj (yog tias koj siv lub khoos phis tawj, nws yuav zoo li yws txog qhov tsis paub USB ntaus ntawv; tsis quav ntsej qhov ntawd). Pib lub Flash Loader Demonstrator. Xaiv qhov chaw nres nkoj COM rau koj tus choj UART. Xaiv "Tshem kev tiv thaiv" yog tias muaj. Xaiv 64kb ntau dua li 128kb flash version. Thiab rub lub bootloader binary.
Ua txhua yam tsis muaj zog thiab tom qab ntawd txav lub jumper los ntawm B0+/chaw mus rau B0-/chaw. Tam sim no koj muaj bootloader uas koj tuaj yeem siv nrog Arduino IDE.
Kauj ruam 2: Teeb Arduino IDE
Kuv xav tias koj muaj qhov tseeb Arduino IDE teeb tsa.
Hauv Cov Cuab Yeej | Ntsiab | Cov Thawj Tswj Haujlwm, teeb tsa kev txhawb nqa rau Arduino Zero (tsuas yog muab Zero tso rau hauv kev tshawb nrhiav, nyem rau ntawm qhov pom nkag, thiab tom qab ntawd Nruab). Yog, koj tsis ua haujlwm nrog Xoom, tab sis qhov no yuav teeb tsa txoj cai gcc compiler.
Tom ntej no, rub tawm stm32duino core. Ntawm Windows, Kuv pom zoo rub tawm cov ntawv zip, txij li thaum kuv tshawb xyuas cov ntaub ntawv (lees paub, nrog svn), Kuv muaj qee qhov teeb meem tso cai nrog cov ntaub ntawv hauv Windows cov cuab yeej npe uas xav tau kho. Muab cov ceg ntoo tso rau hauv Arduino/Kho vajtse/Arduino_STM32 (yog li koj yuav muaj cov ntawv zoo li Arduino/Kho vajtse/Arduino_STM32/STM32F1, thiab lwm yam) Ntawm Windows, teeb tsa cov tsav tsheb los ntawm kev tsav tsheb khiav yeej / install_drivers.bat.
Kauj Ruam 3: Nruab CapacitiveController Sketch
Hauv Arduino IDE, xaiv Sketch | Suav nrog Tsev Qiv Ntawv | Tswj Tsev Qiv Ntawv. Tshawb nrhiav "ADCTouchSensor" thiab teeb tsa version 0.0.6 lossis tshiab dua. Rov ua dua thiab tshawb nrhiav "USBHID" thiab teeb kuv lub tsev qiv ntawv USBHID_stm32f1.
Xaiv Cov Ntaub Ntawv | Piv txwv | ADCTouchSensor | CapacitiveController.
Nco ntsoov tias koj muaj cov teeb tsa hauv qab no hauv Cov Cuab Yeej:
- Pawg Thawj Coj: Generic STM32F103C8
- Upload txoj hauv kev: STM32duino Bootloader
Txuas lub rooj tsavxwm rau hauv lub khoos phis tawj thiab nyem rau sab xis-xub "upload" khawm. Tej zaum koj yuav tsum tau rov pib dua lub rooj tsavxwm (nias lub pob pib dua rau nws) thaum cov lus tshaj tawm pom tshwm hauv lub console.
Kauj Ruam 4: Kev Sib Txuas thiab Khawm
Nrog lub cuab yeej tsis txuas, khiav cov xov hlau los ntawm STM32F1 tus pin rau koj cov chaw tswj. Txuas nrog cov nab kuab, cov ntawv kaw, lossis tsuas yog siv cov hlua dhia mus rau hauv cov khoom. Koj tuaj yeem siv daim ntawv qhia zaub mov lossis tus poj niam-rau-txiv neej dhia. Rau Tetris ntawm lub khoos phis tawj, peb tau siv hom keyboard thiab cov xub xub; rau Pac Man ntawm lub ntsiav tshuaj, peb siv USB OTG cable thiab hom joystick.
Lub CapacitiveController kos duab ntsuas qhov ntsuas lub peev xwm thaum nws qhib. Nco ntsoov tias thaum koj tab tom tig nws, koj tsis kov qhov chaw tswj, xov hlau rau lawv lossis tus pin. Thiab yog tias koj hloov kho qhov chaw tswj hwm, koj yuav tsum rov ntsuas dua los ntawm kev tshem tawm thiab ntsaws rov qab los lossis nias lub pob pib dua dawb ntawm lub rooj tsavxwm.
Feem ntau ntawm cov apps ntawm no yuav ua haujlwm, nrog rau ntau yam ntxiv. Koj tseem tuaj yeem pom muaj pes tsawg Makey Makey cov haujlwm koj tuaj yeem hloov kho.
Qee qhov chaw tswj tau zoo:
- txiv hmab txiv ntoo thiab zaub
- luaj ua luaj
- aluminium ntawv ci (tshwj tsis yog cov xwm txheej zoo li qub)
- hnyav cov xaum xaum khawm/sib txuas ntawm daim ntawv (cov kab sib txuas yuav tsum tsis txhob ntev dhau-hauv daim duab, khawm qis tshaj plaws tsis ua haujlwm)
- sim nrog ntau ntxiv! (koj tseem tuaj yeem sim tweak 25 hauv yog (sensors -> nyeem ()> 25) kab hauv qhov chaws rau qee qhov chaw)
Keyboard hom kev sib txuas:
- Tawm A10 tsis txuas
- A0: qhov chaw
- A1: up rau
- A2: sab laug
- A3: lej
- A4: yog
- A5: wb
- A6: ib
- 7a: s ua
- 0b: d ua
- B1: f ua
Gamepad/Joystick hom kev sib txuas:
- Txuas A10 rau hauv av (G) los teeb hom joystick
- A0: khawm 1
- A1: up rau
- A2: sab laug
- A3: lej
- A4: yog
- A5-A7, B0, B1: khawm 2-6
Hint:
Yog tias koj siv tus txiv neej-rau-poj niam dhia, koj tuaj yeem ua tus joystick hom A10-hauv av txuas los ntawm kev cuam tshuam tus txiv neej xaus ntawm ob tus neeg dhia mus rau ib leeg, yog li tsim ua poj niam-rau-poj niam jumper.
Pom zoo:
Tus Nqi ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Me Me: 6 Cov Kauj Ruam (nrog Duab)
Tus Nqi ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Me Me: Hloov Kho: 29th Oct 2020Tested nrog ESP8266 board library V2.7.4 - worksUpdate: 23rd Sept 2016Do Not use the Arduino ESP board library V2.3.0 for this project. V2.2.0 worksUpdate: 19th May 2016Rev 14 ntawm qhov haujlwm no kho kho cov tsev qiv ntawv thiab cov cai kom ua haujlwm w
Tsis siv neeg Catapult rau Pov Cov Khoom Noj (dev, miv, Qaib, thiab lwm yam), Pov Pob thiab Ntau Ntxiv!: 4 Cov Kauj Ruam (nrog Duab)
Tsis siv neeg Catapult rau Zaub Zaub Tsiaj (dev, Miv, Qaib, Etc), Pov Pob thiab Ntau Ntxiv!: Nyob zoo thiab txais tos rau kuv thawj Qhov Kev Qhia! Kuv tau tsim txoj hauv kev kom qeeb qhov no, los ntawm cov npas nrog cov zaub mov sab hauv los pov nws thoob plaws lub tiaj nraum qaum tsev. Amazingly, nws yog
Tsim Arduino Rau Hauv Nissan Qashqai rau Automate Wing Mirror Folding lossis Lwm Yam Ntxiv: 9 Cov Kauj Ruam (nrog Duab)
Tsim Arduino Rau Hauv Nissan Qashqai rau Automate Wing Mirror Folding lossis Lwm Yam Ntxiv: Nissan Qashqai J10 muaj ob peb yam me me cuam tshuam txog kev tswj hwm uas tuaj yeem yooj yim dua. Ib ntawm lawv yog yuav tsum nco ntsoov thawb lub iav qhib/kaw hloov ua ntej coj tus yuam sij tawm ntawm qhov hluav taws. Lwm qhov me me teeb tsa
Wireless Serial (UART) rau Arduino/STM32/thiab lwm yam: 3 Kauj Ruam (nrog Duab)
Wireless Serial (UART) rau Arduino/STM32/etc: Vam tias txhua tus yuav pom zoo nrog kuv tias Arduino Serial yog lub cuab yeej zoo rau kev debug koj cov haujlwm. Zoo, nws yog qhov kev xaiv nkaus xwb rau kev debug Arduino. Tab sis qee zaum, nws tsis muaj peev xwm lossis ua tau zoo los khiav USB cable los ntawm Ard
Yuav Ua Li Cas Rau Koj Tus Kheej USB Tsheb Charger Rau Ib Tug IPod lossis Lwm Yam Khoom Uas Them Los Ntawm USB: 10 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Rau Koj Tus Kheej USB Tsheb Charger Rau Ib Tug IPod lossis Lwm Yam Khoom Uas Them Los Ntawm USB: Tsim USB tsheb them rau txhua lub iPod lossis lwm yam khoom siv uas tau them Via USB los ntawm kev sib txuas ua ke lub tsheb hloov pauv uas tso tawm 5v thiab USB Poj niam ntsaws. Qhov tseem ceeb tshaj plaws ntawm txoj haujlwm no yog kom ntseeg tau tias qhov kev tso tawm uas koj xaiv lub tsheb hloov pauv yog thawj koom ruam