Cov txheej txheem:

8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv: 4 Cov Kauj Ruam (nrog Duab)
8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv: 4 Cov Kauj Ruam (nrog Duab)

Video: 8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv: 4 Cov Kauj Ruam (nrog Duab)

Video: 8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv: 4 Cov Kauj Ruam (nrog Duab)
Video: Make Your Own LED Matrix ! 2024, Hlis ntuj nqeg
Anonim
8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv
8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv
8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv
8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv
8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv
8x8 Led Matrix Moos & Ceeb Toom Tiv Thaiv Kev Tiv Thaiv

Hauv Cov Lus Qhia no peb yuav pom yuav tsim li cas 8x8 Led Matrix Clock qhib los ntawm kev ntsuas pom.

Lub moos no tseem tuaj yeem siv ua cov khoom tiv thaiv kev nkag mus uas xa lus ceeb toom yog tias lub suab tau pom mus rau tus lej xov tooj !!!

Peb yuav ua nrog ob yam khoom sib txawv:

  • Lub moos digital, tswj los ntawm Wemos D1 mini
  • Ib lub chaw tswj hwm nruab nrab (rasperry) qhov chaw mosquitto tab tom khiav (tus tswv lag luam MQTT) uas ua rau sib cuam tshuam ntawm lub moos thiab lub xov tooj bot

Qhov kev tsim vaj tsev no tau xav los tswj kev sib txuas lus ntawm lwm cov khoom siv, nrog rau kev ua haujlwm sib txawv (piv txwv li ntsuas qhov ntsuas kub, xa tawm, …), rau lub xov tooj bot

Khoom siv

Ib feem ntawm Cov Sijhawm Digital:

  • Wemos D1 Mini
  • Wemos D1 Mini - RTC shield8x8 Led Matrix nrog MAX7219
  • PIR sensor yog
  • Cov qhob cij
  • Cov kab
  • USB charger

Ib daim ntawv teev npe ntawm Chav Tswj Xyuas Hauv Paus

  • Raspberry PI PIB
  • USB charger

Kauj Ruam 1: Tsim Lub Sijhawm

Tsim lub moos
Tsim lub moos
Tsim lub moos
Tsim lub moos
Tsim lub moos
Tsim lub moos

Tsim lub moos:

  • ntxig rau 4 8x8 Matrix Led hauv daim ntawv qhia zaub mov
  • tsim kev sib txuas
  • Sib sau ua ke Wemos D1 mini rau RTC daim thaiv thiab rau PIR Sensor
  • Tiav kev twb kev txuas

Muab 4 Led Modules, ib sab ntawm ib sab thiab txuas cov pins tso tawm ntawm txhua tus qauv mus rau tus lej nkag ntawm tus tom ntej.

  • VCC => VCC
  • GND => GND
  • DOUT => DIN
  • CS => CSY
  • CLK => CLK

Thawj tus lej nkag tswv yim yuav tsum txuas nrog Wemos D1 mini pins zoo li no:

  • VCC => 5V
  • GND => GND
  • DIN => D7
  • CS => D6
  • CLK => D5

Txuas nrog PIR senosor rau Wemos D1 mini pins:

  • VCC => 5V
  • Tawm => D0
  • GND => GND

Kev sib txuas tau npaj tiav!

Kauj Ruam 2: Sau thiab Thauj Txoj Haujlwm rau Wemos D1mini

Sau thiab Thauj Txoj Haujlwm rau Wemos D1mini
Sau thiab Thauj Txoj Haujlwm rau Wemos D1mini

Cov ntaub ntawv Wemos_reogio.ino tau muab tso rau hauv cov lus qhia no yog li koj tuaj yeem thauj khoom thiab hloov kho nrog koj lub network parametrs hauv koj li arduino IDE.

Qhov kev zov me nyuam hloov ntawm lub leds thaum lub PIR sensor zoo siab, rau 20 vib nas this (lossis ntau dua yog tias lub ntsuas tseem ua rau muaj kev zoo siab) tom qab ntawd nws tua lub leds. Thaum lub esp8266 pom cov lus los ntawm MQTT hauv cov qauv hauv qab no:

["Pir_on": 1} Hom Kev Tshawb Nrhiav tau qhib thiab cov lus hauv qab no tau tshaj tawm ntawm MQTT txhua lub sijhawm PIR sensor zoo siab (thawj zaug):

["Pir_off": 1} Ib yam li cov cuab yeej no muaj ob yam sib txawv:

kev txav mus los qhib lub moos ceeb toom-cuam tshuam ceeb toom Thiab qhov kawg no yog "npog" los ntawm lub moos "ib txwm"

Qee qhov teeb meem:

Yog tias koj tsis tau teeb tsa esp8266 hauv Arduino IDE, koj tuaj yeem saib cov lus qhia ntawm no:

www.instructables.com/id/Setting-Up-the-Ar…

Koj yuav tsum nruab cov tsev qiv ntawv rau

RTC ntaub thaiv npog: RTClib.h

github.com/adafruit/RTClib

CEEB TOOM: lub sijhawm hauv rtc yuav tsum tau teeb tsa thawj zaug RTC daim ntaub thaiv tau teeb nrog lub roj teeb, tom qab ntawd nws yuav khaws cov ntaub ntawv, kom txog thaum lub roj teeb raug tso tawm.

8x8 Led Matrix: LedControl.h

github.com/esp8266/Basic/blob/master/libra…

Nov yog ib qho piv txwv ntawm kev tswj cov leds no:

www.instructables.com/id/Interface-LED-Dot…

Tej zaum yog qhov koj yuav tsum tau hloov qhov kev txiav txim uas leds tau sau, nyob ntawm qhov thaiv kab. txheeb xyuas nws thiab, hauv qhov xwm txheej, koj tuaj yeem hloov kho kab hauv qab no: int revDisp = numDisplay - disp -1; // thim rov qab qhov kev txiav txim siab ntawm cov vaj huam sib luag ZOO TSHAJ PLAWS: Nws DEPENDS NTAWM WIRING

koj yuav tsum tau teeb tsa MQTT cov tsev qiv ntawv los tswj:

MQTT raws tu qauv: PubSubClient.h

www.arduinolibraries.info/libraries/pub-su…

hauv txoj cai no MQTT broker tau teeb tsa hauv Raspberry nrog IP zoo li qub. Nov yog qhov piv txwv:

www.instructables.com/id/How-To-Assign-A-S…

Kauj Ruam 3: Npaj Telegram Bot

Npaj Telegram Bot
Npaj Telegram Bot

Ntawm no peb tsis piav qhia txog kev teeb tsa raspberry, tsis yog kev sib txuas lus ntawm raspberry thiab tus lej xov tooj, vim tias muaj ntau cov lus sau txog qhov no.

Piv txwv yog:

www.instructables.com/id/Set-up-Telegram-B…

Kauj Ruam 4: Npaj Raspberry thiab Load Mosquitto

Koj yuav tsum teeb tsa mosquitto ntawm Raspberry, koj tuaj yeem pom ntau qhov kev qhia, ntawm no piv txwv txog kev tswj hwm MQTT ntawm Raspberry thiab esp8266:

www.instructables.com/id/How-to-Use-MQTT-W…

Peb tau npaj cov phiaj xwm nab hab sej uas ua haujlwm sib cuam tshuam ntawm xov tooj thiab MQTT tus broker, hloov pauv:

  • lus txib los ntawm bot hauv cov lus tshaj tawm ntawm MQTT, yog li lawv tuaj yeem mloog los ntawm esp8266
  • cov lus tshaj tawm hauv MQTT los ntawm esp8266 hauv cov lus rau bot

Pom zoo: