Cov txheej txheem:
- Kauj Ruam 1: Cov Khoom Uas Koj Xav Tau
- Kauj ruam 2: Kev thaiv kab
- Kauj ruam 3: Code
- Kauj ruam 4: Daim ntawv thov
- Kauj ruam 5: Android Daim Ntawv Thov
- Kauj Ruam 6: Txheeb Cov Yees Duab kom Paub Ntau Ntxiv
Video: Score Board Project Nrog P10 LED Zaub Siv DMD: 6 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:30
Feem ntau peb ntsib hauv chaw ncaws pob; muaj lub rooj tsav xwm loj heev LED uas ua haujlwm ua tus ntaus cim. Yog li kuj tseem nyob hauv lwm qhov kis las, feem ntau peb paub cov qhab nia ntawm cov vijtsam ua los ntawm LED. Txawm hais tias tsis tuaj yeem ua tau, tseem muaj thaj chaw uas tseem siv phau ntawv tuav tswj.
Hauv txoj haujlwm no, peb tsim cov qhab nia siv Dot-matrix Display siv Bluetooth-based Android Smartphone ua tus tswj hwm.
Kauj Ruam 1: Cov Khoom Uas Koj Xav Tau
Koj yuav xav tau:
- Arduino Ib
- SFE DMD Txuas
- P10 Sab Nraud/ Sab Nraud Sab Nraud
- HC-05 Bluetooth Module
- Lub Hwj Huam 5 Volt
- Tact Hloov
- Pawg Mov Ci
- Jumper Hlau
Kauj ruam 2: Kev thaiv kab
Thaum cov khoom sib sau tau sau tseg, txuas txhua feem raws li cov txheej txheem saum toj no.
Kauj ruam 3: Code
Tom qab txhua qhov txuas txuas nrog, xyuas kom tseeb tias cov khoom siv tau teeb tsa zoo ua ntej tig nws. Kuj txuas DMD txuas raws li tus pin qhia ntawm PCB. Txuas Arduino ntawm koj lub PC / Laptop, thiab rub qhov program hauv qab no.
// Insert File library #suav nrog #include #include
// Txhais kev ua haujlwm
#define bCLEAR A1 #define bRIGHT A2 #define bLEFT A0 #define Panjang 2 // Number of height of Display P10 #define Lebar 1 // Number of width of Display P10
SoftDMD dmd (Panjang, Lebar);
// Tshaj Tawm Kev Hloov Pauv byte Brightness; byte debounce = 100; int rightScore = 0; int leftScore = 0; koj i; char dmdBuff [10]; tus BT; // Teeb tsa muaj nuj nqi, ua tiav ib zaug arduino rov pib kho qhov tsis muaj teeb tsa () {Brightness = EEPROM.read (0); dmd.setBrightness (10); dmd.selectFont (MyBigFont); dmd.begin (); dmd.clearScreen (); Serial.begin (9600); pinMode (bCLEAR, INPUT_PULLUP); pinMode (bRIGHT, INPUT_PULLUP); pinMode (bLEFT, INPUT_PULLUP);
blinkDisplay ();
} // Blink Zaub Muaj nuj nqi, ua kom cov duab ntsais muag tsis pom blinkDisplay () {dmd.clearScreen (); ncua (300); sprintf (dmdBuff, "%d", leftScore); dmd.drawString (0, 0, dmdBuff); dmd.drawString (29, 0, "-"); sprintf (dmdBuff, "%2d", rightScore); dmd.drawString (43, 0, dmdBuff); ncua (300); dmd.clearScreen (); ncua (300); sprintf (dmdBuff, "%d", leftScore); dmd.drawString (0, 0, dmdBuff); dmd.drawString (29, 0, "-"); sprintf (dmdBuff, "%2d", rightScore); dmd.drawString (43, 0, dmdBuff); ncua (300); dmd.clearScreen (); ncua (300); } // Lub hom phiaj muaj txiaj ntsig, tso tawm cov lus NTAWV thaum nkag mus rau qhov tsis muaj lub hom phiaj () {dmd.clearScreen (); ncua (400); dmd.drawString (5, 0, "NTAWV !!!"); ncua (400); dmd.clearScreen (); ncua (400); dmd.drawString (5, 0, "NTAWV !!!"); ncua (3000); } // Loop Function, ua ntau zaus tsis muaj dab tsi voj () {yog (Serial.available ()) {BT = Serial.read (); } yog (digitalRead (bCLEAR) == LOW || BT == 'X') {ncua (debounce)); leftScore = 0; rightScore = 0; dmd.clearScreen (); BT = 0; } yog (digitalRead (bLEFT) == LOW || BT == 'A') {ncua (debounce)); leftScore ++; Lub hom phiaj (); blinkDisplay (); BT = 0; } yog (digitalRead (bRIGHT) == LOW || BT == 'B') {ncua (debounce)); rightScore ++; Lub hom phiaj (); blinkDisplay (); BT = 0; }sprintf (dmdBuff, "%d", leftScore); dmd.drawString (0, 0, dmdBuff); dmd.drawString (29, 0, "-"); sprintf (dmdBuff, "%2d", rightScore); dmd.drawString (43, 0, dmdBuff); ncua (300); yog (digitalRead (bLEFT) == LOW && digitalRead (bRIGHT) == LOW) {dmd.clearScreen (); ncua (debounce); setBrightness: Brightness = EEPROM.read (0); yog (digitalRead (bLEFT) == LOW) {ncua (debounce); Brightness ++;} yog (digitalRead (bRIGHT) == LOW) {ncua (debounce); Brightness--;} EEPROM.write (0, Brightness); dmd.setBrightness (Brightness); sprintf (dmdBuff, "%3d", Ci ntsa iab); dmd.drawString (16, 0, dmdBuff); ncua (50);
yog (digitalRead (bCLEAR) == 0) {dmd.clearScreen (); ncua (debounce); rov ();}
lwm tus {goto setBrightness;}}}
Kauj ruam 4: Daim ntawv thov
Yog tias muaj qhov ua yuam kev tshwm sim thaum rub tawm cov program, koj xav tau DMD lub tsev qiv ntawv uas twb muaj lawm ntawm cov ntawv ntxiv los txhawb nqa cov lus ntawm cov qhab nia, rub tawm DMD2 cov tsev qiv ntawv. Cov duab saum toj no yog Scoreboard zaub.
Kauj ruam 5: Android Daim Ntawv Thov
SFE Scoreboard android apps tuaj yeem rub tawm ntawm no. Nov yog lub ntsiab lus tseem ceeb ntawm SFE Score Board app.
Yuav siv nws li cas, raws li hauv qab no:
- Nruab daim ntawv thov ntawm koj lub Android Smartphone.
- Qhib lub app, yog tias muaj kev ceeb toom qhib qhib bluetooth nyem yog.
- Txhawm rau txuas rau bluetooth module, nyem lub cim Bluetooth nyob rau sab saum toj ntawm daim ntawv thov, nws yuav tso saib cov npe bluetooth uas tau ua rau koj lub cuab yeej poob qis.
- Tab sis yog tias lub npe ntawm koj lub bluetooth module tsis muaj nyob ntawm lub cuab yeej, koj yuav tsum ua khub ua ntej los ntawm kev nkag mus rau bluetooth teeb tsa cov ntawv qhia zaub mov ntawm koj lub cuab yeej. Tom qab kev tshuaj xyuas txheej txheem tiav thiab tshwm lub npe ntawm koj lub bluetooth module, ua khub. Yog tias tau hais kom nkag mus rau tus password, sau tus lej nkag teb chaws 1234 rau tus qauv txheej txheem, yog tias nws tsis tau hloov pauv.
- Yog tias daim ntawv thov txuas nrog, koj tuaj yeem nkag mus tau cov qhab nia siv koj lub cuab yeej Android.
Kauj Ruam 6: Txheeb Cov Yees Duab kom Paub Ntau Ntxiv
Pom zoo:
P10 DMD Zaub Nrog Arduino thiab RTC DS3231: 4 Cov Kauj Ruam (nrog Duab)
P10 DMD Zaub Nrog Arduino thiab RTC DS3231: P10 cov lus qhia yog cov kab ntawm cov teev matrix LEDs. P10 coj yog feem ntau hu ua Dot Matrix Display lossis DMD zaub. Nws yog ua raws cov npe hloov pauv, feem ntau 74595 cov npe hloov pauv tau siv. Lawv tuaj yeem raug rho tawm nrog ntau tus lej ntawm cov laug cam zoo sib xws. A
Loj hlob Zaub Zaub Ntxiv Hauv Qhov Chaw Tsawg Los Yog Loj hlob Zaub Zaub Hauv Chaw, (Ntau lossis Tsawg): 10 Kauj Ruam
Loj Hlob Ntau Cov Zaub Zaub Hauv Tsawg Chaw lossis … Loj hlob Zaub Zaub Hauv Chaw, (Ntau lossis Tsawg).: Qhov no yog kev tshaj lij tshaj lij rau Kev Loj Hlob Tshaj Ntiaj Teb, Kev Tsim Khoom Sib Tw, xa los ntawm Cov Lus Qhia. Kuv tsis tuaj yeem muaj kev zoo siab dua los tsim rau thaj chaw cog qoob loo thiab tshaj tawm kuv thawj Cov Lus Qhia. Yuav pib, kev sib tw nug peb kom
Zaub Kub ntawm P10 LED Zaub Module Siv Arduino: 3 Cov Kauj Ruam (nrog Duab)
Zaub Kub ntawm P10 LED Zaub Module Siv Arduino: Hauv qhov kev qhia yav dhau los tau hais qhia yuav ua li cas tso saib cov ntawv ntawm Dot Matrix LED Zaub P10 Module siv Arduino thiab DMD Txuas, uas koj tuaj yeem tshawb xyuas ntawm no. Hauv qhov kev qhia no peb yuav muab cov phiaj xwm yooj yim qhia los ntawm kev siv P10 tus qauv raws li cov khoom nruab nrab
Zaub Ntawv ntawm P10 LED Zaub Siv Arduino: 5 Cov Kauj Ruam (nrog Duab)
Luam Cov Ntawv ntawm P10 LED Zaub Siv Arduino: Dotmatrix Zaub lossis ntau zaus hu ua Running Text feem ntau pom hauv khw yog txhais tau tias tshaj tawm lawv cov khoom, nws siv tau thiab yoog raws nws siv uas txhawb cov lag luam ua yeeb yam siv nws li kev tshaj tawm kev qhia. Tam sim no kev siv Dot
Cov Cuab Yeej Siv Hluav Taws Xob thiab Cov Cuam Tshuam Xov: Ua LED Zaub thiab Npuag Hluav Taws Xob uas Rolls Up: 7 Cov Kauj Ruam (nrog Duab)
Cov Cuab Yeej Siv Hluav Taws Xob thiab Cov Cuam Tshuam: Ua kom pom LED thiab Cov Khoom Siv Hluav Taws Xob uas Rolls Up: Ua rau koj tus kheej cov ntaub ua hluav taws xob, xov, kua nplaum, thiab kab xev, thiab siv lawv los ua lub zog ntsuas hluav taws xob, tiv thaiv, hloov pauv, LED cov lus qhia thiab siv hluav taws xob. thiab cov xov hluav taws xob koj tuaj yeem ua cov lus qhia LED thiab cov kab hluav taws xob ntawm ib qho ntaub uas hloov pauv tau