Cov txheej txheem:

Ob-tus Zaub Zaub Siv Ib Leeg 8x8 Led Matrix: 3 Kauj Ruam
Ob-tus Zaub Zaub Siv Ib Leeg 8x8 Led Matrix: 3 Kauj Ruam

Video: Ob-tus Zaub Zaub Siv Ib Leeg 8x8 Led Matrix: 3 Kauj Ruam

Video: Ob-tus Zaub Zaub Siv Ib Leeg 8x8 Led Matrix: 3 Kauj Ruam
Video: Cas Tsis Xaiv Koj - R-Lin Thoj New Song Original By Zaj Dub [Official MV] 2023 2024, Kaum ib hlis
Anonim
Ob-tus lej Zaub Siv Ib Leeg 8x8 Led Matrix
Ob-tus lej Zaub Siv Ib Leeg 8x8 Led Matrix

Ntawm no kuv xav tsim qhov ntsuas kub thiab av noo rau kuv chav. Kuv siv ib qho 8x8 LED Matrix rau tso saib ob tus lej, thiab kuv xav tias ib feem ntawm txoj haujlwm tau txais txiaj ntsig ntau dua. Kuv tau ntim qhov kawg ua siv lub thawv ntawv, pleev xim zoo li ntoo.

Khoom siv

  1. Arduino Nano x1
  2. DHT11 Kub thiab Vaum Sensor x1
  3. 8x8 LED matrix nrog MAX7219 x1
  4. 10K resistor x1
  5. Lub taub hau xov hlau
  6. 5V fais fab mov x1
  7. Cardboard lub thawv (4x8x13 cm)

Kauj ruam 1: Schematic

Schematic
Schematic

DHT11 digital qhov kub thiab txias qhov ntsuas tau muab qhov kub thiab txias ntawm 0 - 50 ° C thiab av noo ntawm 20% txog 90%. Qhov ntsuas kub yog ± 2 ° C (siab tshaj) thiab qhov tseeb qhov tseeb yog ± 5%.

DHT11 kuj tseem muab cov ntsiab lus dew ntsiab lus. Lub lwg taw tes yog qhov kub uas huab cua yuav tsum tau txias kom dhau los ua cov dej ua pa. Thaum txias dua, cov pa dej ua pa yuav ua kom sib xyaw ua cov dej ua kua.

Kauj Ruam 2: Xaim & Boxing

Thaiv & Boxing
Thaiv & Boxing
Thaiv & Boxing
Thaiv & Boxing
Thaiv & Boxing
Thaiv & Boxing
Thaiv & Boxing
Thaiv & Boxing

Ua ntej kuv pleev xim rau lub thawv ntawv uas siv cov xim pleev xim acrylic thiab tom qab ziab rau 1 hnub kuv ua tiav nrog tshuaj tsuag plaub hau. Kuv tau ua lub qhov rai square rau LED zaub ntawm lub hau npog. Tsis tas li kuv tau qhib lub qhov me me rau Arduino Nano fais fab mov thiab tso ob peb qhov nyob ze DHT11 sensor.

Kuv kho Arduino nyob rau ntawm kaum ntawm lub npov loj uas siv lub thawv me me thiab kub silicon.

Kuv tso lub LED matrix rau ntawm lub qhov rais siv daim kab xev pob tshab. Ntawm no nws yog qhov tseem ceeb los tso nws nrog 90 ° tig-clockwise kev sib hloov vim tias txoj cai yuav siv 4 kab sab saud rau kaum tus lej thiab qis dua 4 kab rau chav lej. Rau tus qauv kuv siv sab nrog MAX7219 yuav tsum yog ntawm sab puag.

Vim tias kuv tso Arduino thiab lub ntsuas cua ntawm qhov kaw ntawm lub npov kuv tsis tuaj yeem kaw nws? Koj zoo dua xaiv lwm sab:).

Kauj ruam 3: Code

Code
Code
Code
Code
Code
Code

Ua ntej tshaj upload lub tsev qiv ntawv rau DHT11 (https://github.com/adidax/dht11) thiab LED matrix (https://github.com/wayoda/LedControl) yog tias koj tsis muaj.

Txoj cai siv thawj 4 kab ntawm LED matrix raws li kaum tawm thiab 4 kab kawg ua chav nyob. Yog li piv txwv yog tias koj txheeb xyuas cov cai rau "ib qho" koj yuav pom "11" raws li tig 90 ° raws lub moos. Yog tias koj xav hloov cov lej no thov ua tib zoo saib xyuas qhov ntawd.

byte ib = {B00000000, B01000100, B01111100, B01000000, B00000000, B01000100, B01111100, B01000000};

Cov lis dej num kom tau txais cov lej los ntawm kev nyeem sensor yog:

units = ntub % 10; kaum = (ntub /10) % 10;

Rau kaum tus lej rau lub voj sau raws li hauv qab no:

yog (kaum == 1) {rau (int c = 0; c <4; c ++) {lc.setRow (0, c, ib [c]); }

Rau cov lej suav rau lub voj ua haujlwm raws li hauv qab no:

yog (units == 1) {rau (int c = 4; c <8; c ++) {lc.setRow (0, c, ib [c]); }

Cov lus xaj yog hauv voj raws li hauv qab no:

"° C" -> kub -> "hum" -> humidity -> "dp" -> dew point -> lub ntsiab lus ntawm lwg taw tes (piav qhia hauv qab no)

Kuv muaj qee cov ntaub ntawv hais txog yuav ua li cas tib neeg hnov huab cua raws li lub lwg taw tes thiab muab cov ntaub ntawv ntawd tso rau hauv cov cai raws li hauv qab no:

dp <10: qhuav

9 <dp <15: zoo (g..d)

14 <dp <18: Sweltry (sw)

17 <dp <24: Sweltry ntxiv (sw +)

dp> 23: ntub

Cov lus rau cov lus no tsis zoo tab sis tseem nkag siab rau ib qho 8x8 zaub

Pom zoo: