Cov txheej txheem:

NODEMCU THIAB VISUINO DISPLAY LIVE NEWS FROM INTERNET: 8 Kauj Ruam
NODEMCU THIAB VISUINO DISPLAY LIVE NEWS FROM INTERNET: 8 Kauj Ruam

Video: NODEMCU THIAB VISUINO DISPLAY LIVE NEWS FROM INTERNET: 8 Kauj Ruam

Video: NODEMCU THIAB VISUINO DISPLAY LIVE NEWS FROM INTERNET: 8 Kauj Ruam
Video: aaj ek baar phir se akal haar gyi 😷 2024, Hlis ntuj nqeg
Anonim
Image
Image

Hauv qhov kev qhia no peb yuav siv NodeMCU Mini, OLED Lcd, thiab Visuino los tso tawm xov xwm tshiab txhua ob peb feeb los ntawm internet hauv LCD. Saib daim vis dis aus.

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  • NodeMCU Mini
  • OLED Lcd
  • Cov qhob cij
  • Jumper xov hlau
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas GND los ntawm NodeMCU rau tus pin breadboard (gnd)
  • Txuas 5V tus pin los ntawm NodeMCU rau tus pin breadboard (zoo)
  • Txuas tus pin 0 (SCL) los ntawm NodeMCU rau OLED LCD tus pin (SCL)
  • Txuas tus pin 1 (SDA) los ntawm NodeMCU rau OLED LCD tus pin (SDA)
  • Txuas OLED LCD tus pin (VCC) mus rau tus pin breadboard (zoo)
  • Txuas OLED LCD tus pin (GND) rau tus pin breadboard (GND)

Kauj Ruam 3: Pib Visuino, thiab Xaiv NodeMCU ESP-12

Pib Visuino, thiab Xaiv NodeMCU ESP-12
Pib Visuino, thiab Xaiv NodeMCU ESP-12
Pib Visuino, thiab Xaiv NodeMCU ESP-12
Pib Visuino, thiab Xaiv NodeMCU ESP-12

Txhawm rau pib ua haujlwm rau Arduino, koj yuav tsum muaj Arduino IDE teeb tsa los ntawm no:

Thov nco ntsoov tias muaj qee qhov teeb meem tseem ceeb hauv Arduino IDE 1.6.6. Nco ntsoov tias koj nruab 1.6.7 lossis siab dua, txwv tsis pub Cov Lus Qhia no yuav tsis ua haujlwm! Yog tias koj tsis tau ua raws cov kauj ruam hauv Cov Lus Qhia no teeb tsa Arduino IDE rau program ESP 8266!

Visuino tseem yuav tsum tau teeb tsa. Pib Visuino raws li pom hauv thawj daim duab Nyem rau "Cov cuab yeej" khawm ntawm Arduino tivthaiv (Daim duab 1) hauv Visuino

Thaum cov lus sib tham tshwm, xaiv "NodeMCU ESP-12" raws li qhia hauv daim duab 2

Kauj ruam 4: Teeb WiFi

Teeb WiFi
Teeb WiFi
Teeb WiFi
Teeb WiFi
Teeb WiFi
Teeb WiFi

Xaiv NodeMCU ESP-12 thiab hauv cov khoos phis tawj Modules> WiFi> Cov Ntsiab Lus Nkag Mus, nyem rau […] khawm, kom lub qhov rai “Access points” yuav qhib

Hauv qhov kev hloov kho no rub lub WiFi nkag mus rau sab laug.

  • Hauv qab "SSID" muab lub npe ntawm koj li WiFi Network
  • Hauv qab "Tus password" tso tus password nkag rau koj lub WiFi network

Kaw qhov "Access points" window

Ntawm sab laug hauv tus khoos phis tawj xaiv Modules> Wifi> Sockets, nyem rau ntawm […] khawm, kom lub qhov (socket) qhov rai yuav qhib

Luag tus TCP Client los ntawm sab xis mus rau sab laug

Hauv qab Properties window teeb chaw nres nkoj: 80

Kauj Ruam 5: Hauv Visuino Ntxiv Cheebtsam

Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam

Ntxiv CharToText1 tivthaiv

Teeb Max Ntev 1000

Ntxiv Zaub OLED I2C

Nyem ob npaug thiab nyob rau hauv lub qhov rais luag Text Field mus rau sab laug

Ntxiv Formatted Text

muab qhov no tso rau hauv "cov ntawv" tus nqi: Tau txais

Txais: ntawv/html, thov/xhtml+xml, thov/xml; q = 0.9, duab/webp, duab/apng, */ *; q = 0.8

Txais-Charset: *. *

Txais-Lus: en-US, en; q = 0.7, sl; q = 0.3

Tus tswv tsev: feeds.reuters.com

NTS: 1

Ntxiv Hloov Cov Ntawv (Hloov Chaw 1)

  1. teeb "Los Ntawm Tus Nqi":
  2. teeb "ToValue" kom khoob

Ntxiv Hloov Cov Ntawv (Hloov Chaw 2)

  1. (saib daim duab) teeb "Los Ntawm Tus Nqi": TAB TAB
  2. teeb "ToValue" kom khoob
  • Ntxiv Cov Ntawv Ntev (TextLength2)
  • Ntxiv ContainsText (ContainsText1)
  1. Teeb "ntawv" tus nqi: TAB TAB

    (saib daim duab)

    • Ntxiv Nco Cov Ntawv
    • Ntxiv logic THIAB

    • Ntxiv AddValue
    1. teeb tus nqi: 1

      • Ntxiv CompareValue (CompareValue1)

        1. teeb "sib piv": ctSmallerOrEqual
        2. teeb "tus nqi": 2

        • Ntxiv CompareValue (CompareValue3)

          1. teeb "sib piv": ctBigger
          2. set "tus nqi": 3

          Kauj Ruam 6: Hauv Visuino: Txuas Cov Khoom Siv

          Hauv Visuino: Txuas Cov Khoom Siv
          Hauv Visuino: Txuas Cov Khoom Siv
          • Txuas NodeMCU ESP-12> Modules WiFi Sockets TCP Client1> Pin [Tawm] rau CharToText1 tus pin [Hauv]
          • Txuas CharToText1 tus pin [tawm] rau HloovText1 tus pin [hauv]
          • Txuas Hloov Tus Xov Tooj 1 tus pin [tawm] rau TextLength2 tus pin [hauv] thiab NtimText1 tus pin [hauv] thiab kom Nco Ntsoov 1 tus pin [hauv]
          • Txuas TextLength2 tus pin [tawm] rau CompareValue3 tus pin [hauv]
          • Txuas CompareValue3 tus pin [tawm] rau And1 tus pin [1]
          • Txuas NtimText1 tus pin [tawm] rau And1 tus pin [0]
          • Txuas And1 tus pin [tawm] rau AddValue1 tus pin [hauv]
          • Txuas AddValue1 tus pin [tawm] rau CompareValue1 tus pin [hauv]
          • Txuas CompareValue1 tus pin [tawm] kom Nco Ntsoov1 tus pin [nco ntsoov] thiab tus pin [rov nco qab]
          • Txuas Nco ntsoovText1 tus pin [tawm] rau HloovText2 tus pin [hauv]
          • Txuas Hloov Chaw Txuas 2 tus pin [tawm] rau NodeMCU ESP-12 serial0 tus pin [hauv] thiab rau DisplayOLED1 cov ntsiab lus cov lus teb tus pin [hauv]
          • Txuas DisplayOLED1 tus pin [tawm] rau NodeMCU ESP-12 I2C tus pin [hauv]

          Kauj Ruam 7: Tsim, Ua Ke, thiab Tshaj Tawm Arduino Code

          Tsim, Sau, thiab Tso Tawm Arduino Code
          Tsim, Sau, thiab Tso Tawm Arduino Code
          Tsim, Sau, thiab Tso Tawm Arduino Code
          Tsim, Sau, thiab Tso Tawm Arduino Code

          Hauv Visuino, Nias F9 lossis nyem rau ntawm lub pob uas qhia ntawm daim duab 1 los tsim Arduino code, thiab qhib Arduino IDE

          Hauv Arduino IDE, nyem rau ntawm Upload khawm, txhawm rau sau thiab xa cov cai (Daim duab 2)

          Kauj ruam 8: Ua si

          Yog tias koj ua lub zog NodeMCU, OLED Lcd yuav pib qhia Qhov Tseeb Ntiaj Teb Tseeb.

          Nrog koj zoo siab! Koj tau ua tiav koj Txoj Haujlwm Xov Xwm Tshiab nrog Visuino. Kuj txuas nrog yog Visuino qhov haujlwm, uas kuv tau tsim rau qhov Qhia Qhia no. Koj tuaj yeem rub tawm thiab qhib nws hauv Visuino: Rub tawm txuas

Pom zoo: