Cov txheej txheem:

Score Board Project Nrog P10 LED Zaub Siv DMD: 6 Cov Kauj Ruam (nrog Duab)
Score Board Project Nrog P10 LED Zaub Siv DMD: 6 Cov Kauj Ruam (nrog Duab)

Video: Score Board Project Nrog P10 LED Zaub Siv DMD: 6 Cov Kauj Ruam (nrog Duab)

Video: Score Board Project Nrog P10 LED Zaub Siv DMD: 6 Cov Kauj Ruam (nrog Duab)
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Hlis ntuj nqeg
Anonim
Score Board Project Nrog P10 LED Zaub Siv DMD
Score Board Project Nrog P10 LED Zaub Siv DMD

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

Cov Khoom Koj Xav Tau
Cov Khoom Koj Xav Tau
Cov Khoom Koj Xav Tau
Cov Khoom Koj Xav Tau
Cov Khoom Koj Xav Tau
Cov Khoom 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

Thaiv
Thaiv

Thaum cov khoom sib sau tau sau tseg, txuas txhua feem raws li cov txheej txheem saum toj no.

Kauj ruam 3: Code

Code
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

Daim ntawv thov
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

Android Daim Ntawv Thov
Android Daim Ntawv Thov
Android Daim Ntawv Thov
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:

  1. Nruab daim ntawv thov ntawm koj lub Android Smartphone.
  2. Qhib lub app, yog tias muaj kev ceeb toom qhib qhib bluetooth nyem yog.
  3. 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.
  4. 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.
  5. 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: