Cov txheej txheem:

ESP8266 Huab Cua & KVG Infoscreen: 5 Kauj Ruam
ESP8266 Huab Cua & KVG Infoscreen: 5 Kauj Ruam

Video: ESP8266 Huab Cua & KVG Infoscreen: 5 Kauj Ruam

Video: ESP8266 Huab Cua & KVG Infoscreen: 5 Kauj Ruam
Video: فرصة ربح قطعتين يوميا من عملة رقمية إسلامية قوية Sidra bank تسجيل في دقيقة 2024, Kaum ib hlis
Anonim
ESP8266 Huab cua & KVG Infoscreen
ESP8266 Huab cua & KVG Infoscreen
ESP8266 Huab cua & KVG Infoscreen
ESP8266 Huab cua & KVG Infoscreen

Nov yog qhov yooj yim Infoscreen rau Weatherforecast ntawm darksky.net thiab tsheb npav nres nyob ntawm cov ntxaij vab tshaus hauv Kiel ntawm "KVG Echtzeitabfahrten".

Lub infoscreen yog ua raws NodeMCU (ESP8266) thiab ILI9341 LCD Zaub.

Kauj Ruam 1: Qhov Chaw thiab Cov Cuab Yeej Yuav Tsum Tau

Qhov:

  • NodeMCU Board, muaj ESP8266 Wifi Module (AliExpress, Ebay, Amazon)
  • 2, 8 "kov LCD 320x240px (AliExpress, Ebay, Amazon)
  • Txhua lub txhab nyiaj pheej yig, zoo tshaj nrog lub zog hloov pauv (AliExpress, Ebay, …)
  • Ib co cm ntawm xaim
  • Qee cov ntaub ntawv rau rooj plaub, xws li ntoo

Cov Cuab Yeej:

  • Soldering Hlau & Solder
  • Yog tias muaj lub tshuab CNC rau rooj plaub

Kauj ruam 2: Kev sib txuas

Kev sib txuas
Kev sib txuas

Kev sib txuas ntawm NodeMCU thiab zaub tau qhia saum toj no. Koj tsuas xav tau ob peb kab luv rau kev sib txuas:

Zaub NodeMCU

  • VCC 3.3V
  • GND GND
  • TSO D8
  • TSA 3.3V
  • DC D3 ua
  • SDI D7 AW
  • SWB D5
  • LED 3.3V
  • TSO D6
  • TXL D5
  • TWS D2
  • TSI_D7
  • TSO D6
  • T_IRQ D1

Kauj Ruam 3: Kev npaj ntawm Arduino IDE

Kuv siv Arduino IDE (v1.8.2) rau kev ua haujlwm.

Nruab ESP8266 Arduino kev txhawb nqa Tom qab rub tawm IDE koj yuav tsum qhia lub software los txhawb ESP8266 cov qauv:

  1. Mus rau hauv File> Preferences
  2. Ntxig kab hauv qab no rau hauv "Tus Thawj Saib Xyuas Haujlwm Ntxiv URLs" daim teb:
  3. Mus rau Cov Cuab Yeej> Rooj Tswjhwm Saib> Pawg Thawj Coj …
  4. Tshawb nrhiav ESP8266 thiab teeb tsa "esp8266by ESP8266 Community".
  5. Mus rau Cov Cuab Yeej> Rooj Tswjhwm Saib thiab xaiv koj pawg ESP8266. Yog tias koj tau yuav ib ntawm cov laug cam kuv tau hais los saum no koj yuav tsum xaiv NodeMCU 1.0 (ESP-12E Module).
  6. Tom qab kev teeb tsa tsav tsheb xaiv qhov chaw nres nkoj raug rau NodeMCU ntawm Cov Cuab Yeej> Chaw Nres Nkoj.

Nruab CH340 tus tsav tsheb Yog tias tsis muaj, tam sim no koj yuav tsum nruab CH340 cov tsav tsheb rau koj OS. Koj tuaj yeem pom cov tsav tsheb ntawm google lossis piv txwv. nov.

Txhim kho cov tsev qiv ntawv Arduino xav tau Mus rau Sketch> suav nrog Tsev qiv ntawv> Tswj cov tsev qiv ntawv… thiab teeb tsa cov tsev qiv ntawv hauv qab no:

  • ArduinoJson los ntawm Benoit Blanchen
  • Json Streaming Parser los ntawm Daniel Eichhorn

Peb kuj yuav tsum tau teeb tsa cov tsev qiv ntawv ntxiv, uas tsis tuaj yeem pom hauv tus thawj tswj tsev qiv ntawv. Muaj ob txoj hauv kev txhim kho. Qhov yooj yim tshaj plaws yog theej cov tsev qiv ntawv suav nrog hauv kuv qhov GitHub qhov project rau hauv koj lub Arduino "library" folder thiab rov pib dua Arduino IDE. Lwm qhov yog rub tawm cov tsev qiv ntawv xav tau los ntawm GitHub thiab nruab nws:

  • TFT_eSPI los ntawm Bodmer
  • XPT2046 los ntawm Spapadim
  • Sijhawm los ntawm PaulStoffregen

Rub tawm qhov haujlwm los ntawm GitHub

github.com/basti8909/Weather-KVG-infoscreen

Kauj Ruam 4: Kev Kho Tus Kheej Li Cas

Yog tias koj tau teeb tsa lub tsev qiv ntawv manually, koj thawj zaug los kho cov ntaub ntawv "User_Setup.h" ntawm TFT_eSPI lub tsev qiv ntawv. Txwv tsis pub, koj tuaj yeem hla ob kab tom ntej.

  • Kab 17: qhib ILI9341_DRIVER
  • Kab 83-86: txhais Pins rau Zaub zoo li nws tau qhia hauv Kev Txuas Txuas

Tam sim no qhib ESP_InfoDisplay.ino cov ntaub ntawv nrog Arduino IDE thiab kho koj li software:

WiFi

Hauv kab 108 teeb tsa SSID thiab Password

Nres Tsheb Npav

Koj xav tau tus lej npav npav KVG rau koj qhov chaw nres tsheb npav xav tau. Qhov no tuaj yeem ua tiav los ntawm kev qhib lub vev xaib hauv qab no, qhov uas koj tso ib feem ntawm koj lub npav nres lub npe tom qab "nug =", piv txwv li "lus nug = Dreiecks"

kvg-kiel.de/internetservice/services/lookup…

Tam sim no koj yuav tsum pom cov npe nrog koj lub npe nres tsheb npav. Qhib qhov chaws ntawm lub xaib thiab koj pom qee yam xws li "li stop =" 23 "> Dreiecksplatz" qhov twg 23 yog koj tus lej npav nres. Tam sim no koj tuaj yeem tso tus lej no hauv kab 172/175/178 ntawm cov ntaub ntawv tseem ceeb lossis saib mus rau hauv cov ntaub ntawv KVGliveAPI.h thiab txuas ntxiv koj lub tsheb npav nres tsis mus rau cov npe sau (xws li "zoo li qub hauv Dreiecksplatz = 23;") thiab siv qhov no npe (KVGliveAPI:: KVGstop:: Dreiecksplatz) hauv kab 172/175/178 ntawm cov ntawv tseem ceeb.

Yog tias koj xav kom muaj ntau dua/tsawg lub tsheb npav nres koj tsuas yog yuav tsum hloov cov lus hloov pauv pib los ntawm kab 170 thiab hloov tus lej siab tshaj plaws hauv kab 138.

Huab cua API nkag thiab qhov chaw

Txhawm rau nkag mus rau darksky.net API koj xav tau tus lej zais uas yog 100% pub dawb. Koj tsuas yog yuav tsum tso npe rau ntawm darksky.net rau cov tsim tawm. Tom qab nkag mus, koj pom daim teb nrog lub npe "Koj tus yuam sij zais". Qhov 32 tus lej hex tus lej koj yuav tsum luam rau kab 61 ntawm cov ntawv DarkSkyAPI.h nruab nrab ntawm qhov sib tsoo.

Yog tias koj xav hloov chaw huab cua koj tsuas yog yuav tsum hloov kab 16 ntawm cov ntawv DarkSkyAPI.cpp thiab kab 25 rau lub npe ntawm qhov chaw.

Tam sim no koj tuaj yeem suav sau thiab xa qhov program mus rau ESP8266 (thiab nws yuav tsum ua haujlwm!:))

Kauj Ruam 5: Tsim Rooj Plaub

Tuaj tom qab…

Pom zoo: