Cov txheej txheem:

Zaub Kub ntawm P10 LED Zaub Module Siv Arduino: 3 Cov Kauj Ruam (nrog Duab)
Zaub Kub ntawm P10 LED Zaub Module Siv Arduino: 3 Cov Kauj Ruam (nrog Duab)

Video: Zaub Kub ntawm P10 LED Zaub Module Siv Arduino: 3 Cov Kauj Ruam (nrog Duab)

Video: Zaub Kub ntawm P10 LED Zaub Module Siv Arduino: 3 Cov Kauj Ruam (nrog Duab)
Video: Kev Nrhiav Noj p2 | Tso Tawm Nguj 10 6 19 2024, Kaum ib hlis
Anonim
Zaub Kub ntawm P10 LED Zaub Module Siv Arduino
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 Display 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 tso tawm xov xwm. Lub sijhawm no peb yuav qhia koj txog kev siv lub ntsuas kub ntsuas siv LM35.

Kauj Ruam 1: Cov Khoom Uas Koj Xav Tau

Koj yuav xav tau:

  • Arduino Ib
  • DMD Txuas
  • LM35 Kub Sensor
  • Pawg Mov Ci
  • Jumper Hlau

Kauj ruam 2: Kev sib txuas

Kev sib txuas
Kev sib txuas
Kev sib txuas
Kev sib txuas

Rau kev txuas raws li qhia saum toj no.

Kauj Ruam 3: Txoj Haujlwm

Tom qab kev teeb tsa ua tiav mus rau lub program, lub program xav tau cov ntaub ntawv ntxiv hauv tsev qiv ntawv uas koj tuaj yeem rub tawm >> Library DMD & TimeOne.

Piv txwv ntawm cov kev pab cuam raws li hauv qab no:

/ * Insert file library */ #include #include #include #include #define Panjang 1 // Number of length of Display P10 #define Lebar 1 // Number of width of Display P10 #define sensor A5 // Txhais sensor tus pin = tus pin A5

DMD dmd (Panjang, Lebar); // Ntev x Dav

/ * Deklarasi Variable */ ntab suhu; char chr [5]; void ScanDMD () {dmd.scanDisplayBySPI (); } void teeb (tsis muaj dab tsi) {// Teeb DMD Timer1.initialize (5000); Timer1.attachInterrupt (ScanDMD); dmd.selectFont (SystemFont5x7); // Font siv dmd.clearScreen (muaj tseeb); Serial.begin (9600); // Qhib kev ua haujlwm ntawm kev sib txuas lus ntu} void loop (tsis muaj dab tsi) {dmd.clearScreen (muaj tseeb); sib = 0; suhu = analogRead (nyeem ntawv); suhu = (5.0 * suhu * 100.0) / 1024.0; Serial.println (suhu); dtostrf (suhu, 4, 2, chr); dmd.drawString (2, 0, chr, 5, GRAPHICS_NORMAL); dmd.drawString (6, 9, "Cel", 4, GRAPHICS_NORMAL); ncua (5000); }

Pom zoo: