Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Kauj Ruam 1: Ua LED Matrix
- Kauj Ruam 2: Kauj Ruam 2: Txuas Cov Pushbuttons thiab Hloov Cov Ntawv Sau Npe
- Kauj Ruam 3: Kauj Ruam 3: Tshaj Tawm Txoj Cai
- Kauj Ruam 4: Cov Lus Qhia Ntxiv/Cov Khoom Siv
Video: Pushbutton LED Matrix: 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Txoj haujlwm no tuaj yeem xav txog ntawm lwm qhov kev qhia ua haujlwm Arduino uas tau nce qib me ntsis ntau dua li koj li 'ntsais muag LED' qhov haujlwm. Txoj haujlwm no suav nrog ib qho LED matrix, thawb lub pob, hloov npe (uas tuaj yeem txuag pins ntawm koj lub Arduino board), thiab lub ntsiab lus tseem ceeb hu ua multiplexing. Kuv vam tias koj pom cov lus qhia ua kom pom tseeb thiab twv koj tus kheej kom txhim kho nws!
Khoom siv
(1x) Arduino Uno
(5x) Tactile Pushbuttons
(2x) 0.1 uF Capacitors
(2x) 1 uF Capacitors
(8x) 1k Resistors
(5x) 10k Resistors
(2x) 74HC595 hloov npe rau npe
Jumper Hlau
Dub Hlau
Hlau liab
Kauj Ruam 1: Kauj Ruam 1: Ua LED Matrix
Cov ntawv qhia kuv siv los ua 8x8 LED matrix hauv txoj haujlwm no tuaj yeem pom ntawm no. Muaj ntau yam teeb tsa rau LED matrix:
a) Ntau Kab Anode
b) Ntau Kab Cathode
Txij li thaum kuv tau siv Cov Txheej Txheem Rho Cathode ntawm cov qauv, kuv yuav tham txog nws ntawm no thiab koj tuaj yeem txuas ntxiv tib cov kev xav rau Common Row Anode kev teeb tsa. Hauv Cov Txheej Txheem Rho Cathode, cov LEDs 'cathodes (lossis cov dav hlau tsis zoo uas yog luv dua ceg ntawm LED) txuas nrog ua ke hauv kab thaum lub anodes (lossis cov dav hlau zoo uas yog ceg ntev dua ntawm LED) txuas nrog ua ke hauv kab. Txhawm rau hais txog ib qho tshwj xeeb LED, rub kab cathode uas LED cathode nyob qis thiab rub kab anode uas LED anode nyob siab.
Nco tseg: Thaum ua qhov LED matrix uas tau qhia hauv qhov txuas saum toj no, nco ntsoov txuas cov kab anode nrog 1k ohm resistors ua ntej thov siv tus nqi hluav taws xob rau LEDs.
Kauj Ruam 2: Kauj Ruam 2: Txuas Cov Pushbuttons thiab Hloov Cov Ntawv Sau Npe
Cov thaiv rau lub khawm khawm thiab cov npe hloov pauv tau qhia saum toj no. Kuv xav nco ntsoov tias kev hloov pauv rau npe hauv daim duab kab hluav taws xob tsis qhia hauv av (tus pin 8 ntawm IC) thiab Vcc lossis lub zog txuas (tus pin 16 ntawm IC) tus pin rau cov chips; hauv av tus pin txuas nrog GND tus pin ntawm Arduino board thiab Vcc txuas nrog 5V tus pin ntawm Arduino board. Vcc tus pin ntawm txhua qhov kev hloov npe tseem muaj txuas nrog rau 0.1uF capacitor txuas nrog hauv av.
Nco tseg: Cov txiaj ntsig ntawm txhua qhov kev hloov npe tau teev tseg ua QA rau QH (tsis quav ntsej QH*). Lawv tau teev nyob rau hauv nqe lus ntawm qhov tseem ceeb me ntsis (LSB) (rau QA) mus rau qhov tseem ceeb me ntsis (MSB) (rau QH) piv txwv li QA yuav tswj 0 kab lossis kab, thiab lwm yam.
Kauj Ruam 3: Kauj Ruam 3: Tshaj Tawm Txoj Cai
Txoj cai los tswj hwm LED matrix tau txuas rau qhov kev qhia no. Kuv tau sim tawm tswv yim ntau npaum li cov cai raws li kuv tuaj yeem yog li nws yuav pom meej heev tias txoj haujlwm ua haujlwm li cas. Lub hauv paus tseem ceeb ntawm txoj haujlwm yog muaj qhov sib piv uas ua raws qhov LEDs yuav tsum nyob lossis tawm. Txhawm rau kom muaj ntau yam LEDs tso saib kom raug yam tsis tau yuam kev tig rau qhov tsis xav tau diodes yog siv lub tswv yim hu ua multiplexing. Multiplexing yog qhov tseem ceeb teeb pom kev zoo ib leeg LEDs hauv kab tshwj xeeb thaum tag nrho lwm cov LEDs hauv lwm kab, tom qab ntawd ua tib yam rau cov kab uas seem. Qhov ua kom yuam kev yog tias yog LEDs hloov mus los ntawm kab nrawm txaus, koj lub qhov muag tuaj yeem qhia tias cov kab ib leeg tau teeb ib zaug. Yog tias koj xav tshawb nrhiav ntau txoj hauv kev koj tuaj yeem dag koj lub qhov muag nrog LEDs, koj yuav xav saib mus rau hauv lub tswv yim ntawm kev nyob ruaj khov ntawm lub zeem muag (yooj yim tshawb hauv Google lossis Qhia).
Txoj hauv kev kab anode thiab kab cathode tau hloov kho tshiab yog los ntawm tus neeg siv txhais lub luag haujlwm hu ua 'UpdateShiftRegisters'. Lub luag haujlwm no thawj zaug tig lub latch tus pin, uas tswj hwm yog tias ib qho tshiab byte (8 khoom) raug xa mus rau qhov tso tawm, qis yog li tsis muaj kev hloov pauv rau cov txiaj ntsig tau ua tau thaum cov khoom tshiab tau sau rau hauv nti. Tom qab ntawd siv qhov ua haujlwm hauv Arduino hu ua 'ShiftOut', uas tshwj xeeb ua haujlwm xa cov ntaub ntawv kom hloov npe, qhov kev zov me nyuam sau qhov twg (cathode) kab yuav qis thiab qhov twg (anode) kab yuav tsum siab. Thaum kawg, tus latch tus pin raug rub siab kom hloov kho cov zis (LEDs).
Kauj Ruam 4: Cov Lus Qhia Ntxiv/Cov Khoom Siv
Nov yog qee qhov txuas mus rau cov vev xaib lossis cov phau ntawv uas yuav muab cov ntaub ntawv ntxiv txog qhov haujlwm no:
learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/arduino-code
www.arduino.cc/en/tutorial/ShiftOut
www.ti.com/lit/ds/symlink/sn74hc595.pdf
www.youtube.com/watch?v=7VYxcgqPe9A
www.youtube.com/watch?v=VxMV6wGS3NY
Pib Nrog Arduino, 2nd Edition los ntawm Massimo Banzi
Pom zoo:
Cov Sijhawm Digital LED Dot Matrix - ESP Matrix Android App: 14 Cov Kauj Ruam
Digital Clock LED Dot Matrix - ESP Matrix Android App: Kab lus no tau txaus siab txhawb nqa los ntawm PCBWAY.PCBWAY ua cov qauv zoo PCBs rau tib neeg thoob plaws ntiaj teb. Sim nws rau koj tus kheej thiab tau txais 10 PCBs rau tsuas yog $ 5 ntawm PCBWAY nrog qhov ua tau zoo heev, Ua tsaug PCBWAY. ESP Matrix Board uas kuv deve
Cov Ntawv Cim Hluav Taws Xob LED Taws Teeb Cov Neeg Hlau Cov Ntawv Cim - Cov Khoom Siv Soldering: 11 Kauj Ruam
Cov Khoom Siv Hluav Taws Xob LED Taws Teeb Cov Neeg Hlau Daim Npav - Cov Khoom Siv Soldering: Kab lus no tau txaus siab txhawb nqa los ntawm PCBWAY.PCBWAY ua cov qauv zoo PCBs rau tib neeg thoob plaws ntiaj teb. Sim nws rau koj tus kheej thiab tau txais 10 PCBs rau tsuas yog $ 5 ntawm PCBWAY nrog qhov ua tau zoo heev, Ua tsaug PCBWAY. Robadge#1 uas kuv tau tsim rau
Txee Siv Pushbutton - Tinker Cad: 3 Kauj Ruam
Txee Siv Pushbutton | Tinker Cad: Thaum koj tau txais lub laub khawm ua haujlwm, koj feem ntau xav ua qee yam ua raws li pes tsawg zaus khawm raug thawb. Txhawm rau ua qhov no, koj yuav tsum paub thaum lub khawm hloov lub xeev los ntawm kev mus rau, thiab suav pes tsawg zaus qhov kev hloov pauv ntawm lub xeev no tshwm sim. Th
Ob Chav Pushbutton LED Circuit: 5 Kauj Ruam
Ob Chav Pushbutton LED Circuit: Kuv yuav sim kuv lub suab kom zoo li qub txhais tes ntawm kev ua haujlwm thiab ua haujlwm nrog arduinos tab sis, qhov tseeb raug hais, qhov tseeb kuv tsuas yog qhia rau cov no ob peb hnub dhau los, yog li kuv muaj kev xyiv fab dhau ntawm ua tiav tsim thiab ua haujlwm rau kuv
Kev teeb tsa Matrix LED hauv Cov Khoom Siv Hluav Taws Xob qub - Yuav Tsum Tau Cov Khoom Siv: 3 Cov Kauj Ruam (nrog Duab)
Kev teeb tsa Matrix LED hauv Cov Khoom Siv Hluav Taws Xob qub - Yuav Tsum Tau Siv Cov Khoom Siv: Lub teeb pom kev zoo los ntawm lub Windows PC dhau Bluetooth thiab LED cov txheej txheem nthuav tawm Ib co piv txwv ntawm pixel kos duab thiab cov duab ua haujlwm khiav ntawm LED Cov Ntsiab Lus ntawm PIXEL Guts Kit Hauv Cov Lus Qhia no, peb ' yuav