Cov txheej txheem:

Morphing Digital Clock: 14 Kauj Ruam (nrog Duab)
Morphing Digital Clock: 14 Kauj Ruam (nrog Duab)

Video: Morphing Digital Clock: 14 Kauj Ruam (nrog Duab)

Video: Morphing Digital Clock: 14 Kauj Ruam (nrog Duab)
Video: Tau kev seev vim ruam tsis deev. 9/28/2017 2024, Kaum ib hlis
Anonim
Morphing Digital Clock
Morphing Digital Clock
Duab
Duab

Cov vis dis aus nrawm txog qhov haujlwm no. Kuv tau siv txoj hauv kev los teeb tsa lub sijhawm nyob.

Ua tsaug rau kev ua haujlwm ntawm Arduino thiab ESP8266 zej zog, lub moos txias no yog qhov yooj yim tsim los!

  1. Tsuas yog ob lub hauv paus tseem ceeb: Zaub (pom tseeb) thiab WiFi MicroController
  2. Tsis muaj qhov yuav tsum tau siv
  3. Tsis tas yuav tsum muaj txuj ci txuj ci, muab cov lej!

Cia peb pib

Kauj Ruam 1: Daim Ntawv Teev Npe

Daim Ntawv Teev Npe
Daim Ntawv Teev Npe

Txawm hais tias kuv tau suav nrog cov txuas mus rau qhov twg kuv yuav kuv cov khoom, cov khoom no tuaj yeem yooj yim yuav los ntawm lwm tus neeg muag khoom thoob plaws ntiaj teb.

  • P3 64x32 RGB LED Matrix $ 20
  • NodeMCU 32MB ESP8266 WiFi Microcontroller module $ 4.95
  • Poj niam rau Poj Niam 20cm Dupont jumper xov hlau $ 0.85
  • Micro USB Data/Sync cable thiab 5V lub xov tooj charger phab ntsa adapter (Kuv muaj cov no thiab tsis tas yuav nws)
  • 5V 2A MINIMUM Fais Fab Khoom (Kuv muaj qhov no thiab tsis tas yuav nws) $ 7.95
  • Solderless Poj niam chim txuas kom txuas Lub Hwj Huam Siv rau cov khoom siv hluav taws xob.

TSEEM CEEB:

  • Qee qhov USB cables tau tsim los rau kev xa hluav taws xob (them nyiaj) - cov no zoo rau lub zog ua tiav lub moos, tab sis kom xa cov cai rau ESP peb yuav xav tau cov ntaub ntawv/sync USB cable.
  • P3 RGB Matrix muaj ntau dua 6000 LEDs. Txog rau lub moos no, peb yuav tsis tig tag nrho lawv ib zaug, yog li 2 Amp ntau dua li txaus. Txawm li cas los xij, yog tias koj npaj yuav ua ntau dua nrog cov zaub thiab muaj txhua lub LED teeb rau dawb, qhov kev pom zoo siv zog yog 8 Amp yam tsawg kawg nkaus.

Kauj Ruam 2: Cov Lus Tseeb

Cov ntsiab lus thaiv
Cov ntsiab lus thaiv

Muaj ntau cov xov hlau, tab sis tsis txhob txhawj. Txhua yam peb tab tom ua yog txuas ib tus pin rau lwm tus.

Tsuas yog siv koj lub sijhawm. Txheeb ob zaug txhua qhov kev txuas ua ntej thiab tom qab koj ntsaws nws.

Xyuas kom tseeb tias cov xov hlau tau ntxig kom lawv thiaj li tsis yuam kev tuaj yeem ua tsis tau. Lawv zoo heev thaum ua tiav.

Kauj Ruam 3: ESP Txuas

ESP Txuas
ESP Txuas
ESP Txuas
ESP Txuas

Ua ntej, cia peb muab cov hlua txuas rau ntawm ESP. Tsis txhob txhawj xeeb yog tias koj cov xim xaim txawv ntawm kuv li. Cov khub pins twg txuas nrog txhua lub xaim yog qhov tseem ceeb.

Tsis txhob txuas ESP rau koj lub PC YOG. Peb yuav tsum ua kom tiav txhua txoj hlua ua ntej peb txhawb nqa ib yam dab tsi

Peb tab tom siv tus pin D0 txog D8 thiab ob GND.

Peb tuaj yeem hla tus pin 3V vim tias ESP yuav txhawb nqa los ntawm USB chaw nres nkoj.

Peb kuj hla qhov Kev Xa thiab Txais Cov pins vim tias peb yuav sib txuas lus rau ESP ntawm USB lossis WiFi.

Kauj Ruam 4: Matrix thaiv ntu ntu 1

Matrix thaiv ntu 1
Matrix thaiv ntu 1
Matrix thaiv ntu 1
Matrix thaiv ntu 1
Matrix thaiv ntu 1
Matrix thaiv ntu 1
Matrix thaiv ntu 1
Matrix thaiv ntu 1

Tom ntej no, coj mus rau lwm qhov kawg ntawm cov xov hlau jumper peb tau nyuam qhuav txuas mus rau ESP thiab ntsaws lawv rau hauv cov lej.

Ib zaug ntxiv, daim duab suav nrog cov xim ntawm cov xov hlau uas kuv tau siv, tab sis qhov tseeb koj cov xim yuav txawv.

Dab tsi yog qhov tseem ceeb yog tias koj txuas ESP tus pin rau lub matrix raws li qhia hauv kab lus.

Matrix tsis yog sib npaug, muaj sab laug/sab xis, nce/nqis. Thov nco ntsoov cov xub dawb

Cov khoom sib txuas ntawm kuv tus lej tsis tau sau, yog li kuv tau ntxiv daim duab nrog cov ntawv lo. Koj cov lej yuav txawv me ntsis. Cov peev txheej no tham txog lwm lub rooj tsav xwm hauv cov ncauj lus kom ntxaws:

  • PxMatrix los ntawm Dominic Buchstaller
  • RGB Led Matrix Nrog ESP8266 los ntawm Brian Lough aka WitnessMeNow

Kauj Ruam 5: Matrix Wiring Part 2

Matrix thaiv ntu 2
Matrix thaiv ntu 2
Matrix thaiv ntu 2
Matrix thaiv ntu 2
Matrix thaiv ntu 2
Matrix thaiv ntu 2

Txheej thib ob ntawm cov xov hlau txuas txuas sab laug txuas mus rau sab xis txuas ntawm matrix.

Daim duab thib peb qhia sab xis ntawm daim ntawv.

Kauj Ruam 6: Kev Txuas Hluav Taws Xob

Lub hwj chim thaiv
Lub hwj chim thaiv
Lub hwj chim thaiv
Lub hwj chim thaiv
Lub hwj chim thaiv
Lub hwj chim thaiv
Lub hwj chim thaiv
Lub hwj chim thaiv

Cov khoom siv hluav taws xob tau tsim los rau cov ntsia hlau.

Koj tuaj yeem txiav tawm cov kab laug sab thiab hle lub xaim, tab sis kuv tau xaiv khoov cov ceg ntoo thiab siv cov cua sov ntxiv rau qhov tubing kom ntseeg tau tias tsis muaj cov hlau raug. Xijpeem koj ua, xyuas kom cov xov hlau ua kev sib cuag tau zoo, ruaj khov thiab tiv thaiv.

Pom tseeb Cov hlau liab yuav tsum txuas nrog (+) thiab Cov xaim dub rau (-)

Txuas lwm qhov kawg rau cov zaub, rov hais dua polarity: Liab mus rau VCC thiab Dub mus rau GND.

Yog tias koj lub xov tooj tau tsim los ua kom muaj zog ua ob lub lus, nws tsis muaj teeb meem qhov twg koj txuas rau koj ib qho khoom. Txawm li cas los xij nws tseem ceeb heev uas koj tsis thim rov qab liab (+) thiab dub (-)

Yog tias koj tseem tsis tau muaj, tam sim no yog lub sijhawm zoo los tshuaj xyuas ob zaug kom paub tseeb tias txhua lub xov hlau jumper tau txuas nrog cov pins raug (ua ntej peb siv lub zog).

Txheeb xyuas qhov sib txawv ntawm lub hwj chim cable ntxiv, xyuas kom tseeb tias PLUS thiab MINUS TSIS TXAUS SIAB

Hav, peb tau ua tiav nrog thaiv! Tab sis tsis txhob ntsaws rau YET

Kauj Ruam 7: Nruab Arduino IDE

Nruab Arduino IDE
Nruab Arduino IDE

Txhawm rau xa cov cai rau ESP, koj yuav xav tau Arduino software thiab ob peb lub tsev qiv ntawv:

Ua raws li cov lus qhia teeb tsa ntawm Arduino lub vev xaib.

Arduino tau ua tiav ntau rau cov neeg tsim khoom, yog li koj yuav tsum pab txhawb rau Arduino, tab sis nws yog nyob ntawm yeem.

Nyem "Tsuas yog rub tawm" rub tawm yam tsis muaj kev koom tes.

Kauj ruam 8: Nruab Libraries

Nruab Libraries
Nruab Libraries

Thaum teeb tsa, tso Arduino IDE tom qab ntawd:

  • Nyem rau Sketch menu> Xws li Lub Tsev Qiv Ntawv> Tswj Tsev Qiv Ntawv …
  • Tshawb nrhiav thiab teeb tsa qhov tseeb ntawm cov tsev qiv ntawv hauv qab no:

    • AdaFruit Gfx lub tsev qiv ntawv
    • PxMatrix los ntawm Dominic Buchstaller
    • ArduinoJSON version 5.13.2 los ntawm Benoit Blanchon
    • WiFiManager los ntawm Tzapu
    • DoubleResetDetector los ntawm Stephen Denne aka Datacute

TSEEM CEEB: Nco ntsoov tias thaum lub sijhawm sau ntawv no, ArduinoJSON version 6.x beta tsis ua haujlwm nrog Morph Clock. Ua li ntawd ua rau sau yuam kev. Nco ntsoov koj qhia meej version 5.13.2 thaum koj teeb tsa/hloov kho ArduinoJSON. Ua tsaug rau cov neeg siv lmirel rau pom qhov no.

Kauj Ruam 9: Nruab ESP8266 Kev Txhawb Nqa

Nruab ESP8266 Kev Txhawb Nqa
Nruab ESP8266 Kev Txhawb Nqa
Nruab ESP8266 Kev Txhawb Nqa
Nruab ESP8266 Kev Txhawb Nqa

Peb kuj xav tau ESP8266 kev txhawb nqa

  • Kaw Tswj Cov Tsev Qiv Ntawv, tab sis nyob hauv Arduino IDE
  • Mus rau File> Preferences
  • Nyem lub cim rau sab xis ntawm Tus Thawj Saib Xyuas Haujlwm Ntxiv URLs
  • Muab qhov URL no tso rau ntawm kab sib cais (ntu tsis muaj teeb meem).

    https://arduino.esp8266.com/stable/package_esp8266com_index.json

  • Nyem Ok kom tawm ntawm Kev Nyiam
  • Mus rau: Cov Cuab Yeej> Pawg xyz> Tus Thawj Saib Xyuas Haujlwm…
  • Nrhiav 8266
  • Nruab esp8266 los ntawm ESP8266 Zej Zog.

Kauj ruam 10: Nruab CH340 Tsav Tsheb

Nruab CH340 Tsav Tsheb
Nruab CH340 Tsav Tsheb

Qhov kawg rau nruab yog lub tshuab tsav tsheb kom peb lub PC tuaj yeem tham nrog ESP.

Rub tawm thiab teeb tsa tus tsav tsheb rau koj lub khoos phis tawj hauv qab ntawm lub khw tsim khoom nplooj ntawv tsav tsheb.

Yog tias koj xav tau kev pab, muaj kev qhia zoo yuav ua li cas rau nruab Arduino Nano CH340 los ntawm samuel123abc. Tib CH340/CH341 uas nyob ntawm NodeMCU ESP nyob ntawm Arduino Nano clone.

Kauj ruam 11: Upload Code

Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai

Peb nyob ze …

  1. Rub tawm thiab unzip qhov tseeb Morphing Clock code.

    • (saib daim duab saum toj no yog tias koj tsis paub nrog github)
    • Unzip cov ntawv zip uas rub tawm ces ob zaug nyem rau MorphingClock.ino
  2. Compile thiab Upload

    • Ua ntej peb ntsaws rau hauv NodeMCU rau koj lub PC ntawm Micro USB cable, koj puas tau tshuaj xyuas koj ob zaug ntxiv?:-)
    • Nco ntsoov tias cov koob ntawm NodeMCU tsis raug luv los ntawm cov khoom siv hlau ntawm koj lub rooj thaum NodeMCU nyob.
    • Thaum koj ntsaws rau hauv USB, koj yuav tsum hnov ib txwm "ding" raws li Windows pom lub USB ntaus ntawv raug ntsaws.
    • Teeb cov kev xaiv hauv Arduino IDE> Cuab Yeej raws li daim duab

      • Koj qhov chaw nres nkoj COM yuav txawv.
      • Kuv yuav tsum hloov Flash Loj rau 4M (1M SPIFFS) koj li ESP yuav txawv.
    • Nyem rau Upload khawm raws li daim duab. Qhov no yuav siv qee lub sijhawm (kwv yees li 30 vib nas this), thiab yuav muaj lus ceeb toom, tab sis nws yuav kawg tso rau NodeMCU.

Teeb meem:

  • Yog tias upload tsis tau vim nws txuas tsis tau, nco ntsoov koj xaiv qhov chaw nres nkoj uas ESP txuas rau hauv qab Cov Cuab Yeej> Chaw Nres Nkoj.
  • Yog tias tsis muaj qhov kev xaiv qhib hauv Cov Cuab Yeej> Chaw Nres Nkoj

    • Nco ntsoov tias koj tau teeb tsa CH340 tus tsav tsheb (saib cov kauj ruam dhau los)
    • Nco ntsoov tias koj siv cov ntaub ntawv/sync cable. Kuaj nws los ntawm kev txuas koj lub xov tooj thiab PC nrog lub xov tooj ntawd. Yog tias koj tuaj yeem pom cov ntaub ntawv hauv xov tooj los ntawm PC, tom qab ntawd koj muaj cov ntaub ntawv zoo.
  • Yog tias kev suav sau ua tsis tiav ua ntej nws sim rub tawm, nyem rau hauv lub qhov rai dub tom qab ntawv thiab tom qab ntawd maj mam nqes mus thiab nco thawj qhov ua yuam kev nws tshaj tawm. Yog tias koj tsis tuaj yeem txheeb xyuas qhov nws tau hais, tshaj tawm thawj qhov ua yuam kev thiab kuv yuav sim pab. Yuav muaj qee qhov lus ceeb toom - cov no yog lawm, lawv tsis tso tseg kev suav sau.
  • yog tias koj tau txais JSON cuam tshuam txog kev ua yuam kev thaum suav sau, siv JSON lub tsev qiv ntawv version 5.13.2 hloov qhov hloov tshiab kawg (6-beta)-Ua tsaug lmirel!
  • Yog tias kev suav sau ua tiav, xa ua tiav tab sis lub moos tsis ua haujlwm, qhib cov saib hauv Arduino IDE, nias rov pib dua ntawm ESP. Yog tias qhov yuam kev yog pawg ntawm tus lej hex, sim hloov Flash Loj rau 4M (1M SPIFFS) thiab rov ua dua.
  • Yog tias qhov ua yuam kev yog lus Askiv, nws yuav tsum qhia koj tias nws muaj teeb meem dab tsi. Tshaj tawm qhov nws hais yog tias koj xav tau kev pab txiav txim siab qhov nws tau sim hais:-)
  • Matrix ua haujlwm, tab sis ESP yeej tsis tshwm li qhov nkag mus. Kuv tau pom qhov no tshwm sim ntawm NodeMCU me dua uas yog raws li ESP-12E thiab 1M SPIFF thiab siv ESP-12E version ntawm MorphClk. Hmoov tsis zoo, kuv tsuas yog tuaj yeem ua haujlwm ib puag ncig qhov teeb meem los ntawm kev txo tus nqi tshiab ntawm cov zaub, yog li cov zaub tsis zoo li piv rau qhov qub version.

Kauj ruam 12: Kev teeb tsa

Kev teeb tsa
Kev teeb tsa
Kev teeb tsa
Kev teeb tsa
Kev teeb tsa
Kev teeb tsa
Kev teeb tsa
Kev teeb tsa

Thaum qhov upload tiav, koj yuav tsum pom lo lus: "Txuas" ntawm cov zaub.

ESP tab tom sim txuas rau koj li WiFi txhawm rau nqa lub sijhawm tam sim no. Txawm li cas los xij, nws tsis paub tus password rau koj li WiFi Access Point (AP) tseem.

  • Nias qhov pib dua (RST) khawm ntawm ESP ob zaug uake txog ib thib ob sib nrug.
  • Cov zaub yuav qhia koj AP: MorphClk, Pwd: HariFun, thiab 192.168.4.1.
  • Lub sijhawm no, ESP tab tom ua lub WiFi nkag mus rau npe hu ua MorphClk nrog tus password HariFun.
  • Mus rau koj lub khoos phis tawj/xov tooj kom hloov pauv koj li kev sib txuas WiFi los ntawm koj li qub WiFi rau MorphClk.
  • Txhawm rau hloov WiFi, ntawm Windows, lub cim nyob hauv qab txoj cai, ntawm Mac nws nyob rau sab xis.
  • Koj yuav pom cov lus ceeb toom hais tias koj lub xov tooj nrhiav tsis tau Internet. Nws yog lawm. Tam sim no koj lub xov tooj txuas nrog JUST rau ESP thiab ESP tsis txuas nrog Is Taws Nem (tseem).
  • Siv lub web browser ntawm koj lub khoos phis tawj/xov tooj, mus ntsib 192.168.4.1, qhov no yog lub vev xaib tau txais los ntawm ESP.
  • Coj mus rhaub "Configure WiFi" thiab xaiv koj lub WiFi nkag mus nkag thiab nkag mus rau koj tus password WiFi. Tom qab ntawd nws yuav khaws cov ntaub ntawv ntawd mus rau qhov chaw ruaj khov yog li koj yuav tsis nkag mus ntxiv.
  • Qhov no tseem yog qhov uas koj xaiv lub sijhawm sijhawm Siv lub vev xaib no txhawm rau nrhiav TimeZone offset rau koj qhov chaw nyob. Tsis txhob hnov qab nkag mus rau qhov kos npe rho tawm.
  • Nkag mus rau Y hauv 24Hr teb kom pom cov xuab moos hauv hom tub rog, lossis nkag rau N yog tias koj xav tau 12 teev hom ntawv. Kuv tseem tsis muaj qhov ntsuas AM/PM. Tej zaum koj tuaj yeem ntxiv qhov ntawd thiab qhia koj li cas?
  • Tsis txhob hnov qab hloov koj lub khoos phis tawj/xov tooj rov mus rau koj li qub WiFi kev nkag mus lossis koj yuav tsis muaj internet nkag tau.

Kauj ruam 13: Txhua yam ua tiav

Duab
Duab

Zoo, yog nws

Txhua yam uas tshuav yog ua rooj plaub zoo rau nws.

Koj tsis xav tau lub computer/xov tooj. Koj tuaj yeem siv txhua lub xov tooj them nyiaj rau lub zog ESP.

Thov qhia rau kuv paub yog tias koj pom ib yam dab tsi uas kuv tuaj yeem txhim kho ntawm cov lus qhia no. Kuv yuav ua qhov zoo tshaj los teb cov lus nug ib yam.

Yog tias koj tsim qhov no, thov nyem qhov "Kuv Ua Nws" khawm thiab qhia tawm koj cov ntawv. Muaj kev lom zem ua!

Kauj Ruam 14: Muab Txoj Cai

Cov neeg zoo ntawm Internet tau txhim kho txoj haujlwm no! Qhia rau kuv paub yog tias koj tau txhim kho koj xav qhia tawm ntawm no. Ua tsaug sawv daws!

Morphing Clock Remix los ntawm lmirel

github.com/lmirel/MorphingClockRemix

Duab
Duab

Hnub, Kub, Txheeb Ze Ua Kom Qhuav los ntawm VincentD6714

drive.google.com/file/d/1TG8Y1IjAQaV7qGPWL…

Duab
Duab
Clocks Contest
Clocks Contest
Clocks Contest
Clocks Contest

Runner Up hauv Kev Sib Tw Clocks

Pom zoo: