Cov txheej txheem:

Clock Internet (NTP) rau IoT Cov Haujlwm: 6 Cov Kauj Ruam
Clock Internet (NTP) rau IoT Cov Haujlwm: 6 Cov Kauj Ruam

Video: Clock Internet (NTP) rau IoT Cov Haujlwm: 6 Cov Kauj Ruam

Video: Clock Internet (NTP) rau IoT Cov Haujlwm: 6 Cov Kauj Ruam
Video: NLP with Python! Term Frequency-Inverse Document Frequency (tf-idf) 2024, Kaum ib hlis
Anonim
Image
Image

Txoj haujlwm no yuav pab koj kom tau sijhawm los ntawm Is Taws Nem rau IoT cov haujlwm, yam tsis tas yuav muaj RTC kho vajtse ntxiv. Hauv qhov kev qhia no, peb yuav siv Nokia LCD 5110 li cas, tau txais NTP cov ntaub ntawv los ntawm Is Taws Nem thiab nthuav tawm nws ntawm LCD ntawm kev tswj hwm tshwj xeeb. Cia peb muaj cov lus qhia luv luv rau NTP.

Kauj ruam 1: Taw qhia

Network Time Protocol (NTP) yog cov txheej txheem siv los sib sau ua ke lub sijhawm ntawm lub computer hauv lub network. Lub sij hawm NTP siv rau ob qho tib si raws tu qauv thiab cov kev pabcuam-server uas ua haujlwm hauv computer.

NTP, uas tau tsim los ntawm David Mills ntawm University of Delaware xyoo 1981, tau tsim los ua kom muaj kev ua txhaum loj thiab ua rau muaj kev phom sij. NTP ua haujlwm li cas? NTP tus neeg siv khoom pib lub sijhawm thov sib pauv nrog NTP server. Raws li qhov txiaj ntsig ntawm kev sib pauv no, tus neeg siv khoom tuaj yeem suav qhov txuas qeeb thiab nws qhov chaw nyob hauv cheeb tsam, thiab kho nws lub moos hauv zos kom phim lub moos ntawm lub server ntawm lub khoos phis tawj. Raws li txoj cai, rau kev sib pauv rau lub sijhawm kwv yees li tsib txog 10 feeb yuav tsum tau pib teev lub sijhawm. Ib zaug ua ke, tus neeg siv khoom hloov kho lub moos txog ib zaug txhua 10 feeb, feem ntau tsuas yog xav tau ib qho lus sib pauv nkaus xwb. Ntxiv rau cov neeg siv-server synchronization. Qhov kev sib pauv no tshwm sim ntawm Tus Neeg Siv Datagram raws tu qauv ntawm chaw nres nkoj 123. NTP kuj tseem txhawb nqa kev tshaj tawm synchronization ntawm cov phooj ywg lub computer moos.

Kauj ruam 2: Cheebtsam

  1. NodeMCU
  2. Nokia 5110 LCD

Kauj ruam 3: Txheej txheem

Kho vajtse sib txuas
Kho vajtse sib txuas

Peb tab tom yuav nthuav tawm lub sijhawm thiab cov ntaub ntawv rau Nokia 5110 LCD, ua ntej koj yuav tsum tau paub nrog Nokia 5110 LCD, koj tuaj yeem siv lwm txoj hauv kev tso tawm los ntawm kev hloov qee qhov kev cai.

Nokia 5110 LCD: nws Nokia 5110 yog lub vijtsam duab LCD yooj yim rau ntau daim ntawv thov. Nws tau xub tsim los ua lub xov tooj ntawm tes. Qhov no tau teeb tsa ntawm ib qho yooj yim rau solder PCB. Nws siv PCD8544 tus tswj, uas yog tib yam siv hauv Nokia 3310 LCD. PCD8544 yog lub zog qis CMOS LCD tswj/tsav tsheb, tsim los tsav cov duab nraaj ntawm 48 kab thiab 84 kab. Txhua lub luag haujlwm tsim nyog rau cov zaub tau muab rau hauv ib lub nti, suav nrog on-chip tiam ntawm LCD khoom thiab kev tsis ncaj ncees, ua rau muaj qhov tsawg kawg ntawm cov khoom sab nrauv thiab siv hluav taws xob tsawg. PCD8544 cuam tshuam rau micro-controllers los ntawm cov npav npav sib txuas.

Kauj Ruam 4: Kev Sib Txuas Kho Vajtse

Siv daim duab fritzing los ua kev sib txuas:

Nokia LCD pins NodeMCU pins

RST ………………………….. D1

CE ……………………………. D2

DC ………………………….. D0

Diab ………………………….. D7

CLK …………………………. D5

VCC ………………………… 3V tus pin ntawm NodeMCU lossis siv sab nraud 3.3v muab

BL …………………………… Common nws nrog VCC tus pin tig rau lub teeb pom kev zoo (koj tuaj yeem ntxiv qhov sib txawv tsis sib xws los kho lub teeb pom kev zoo)

GND ……………………….. GND NPE

Kauj Ruam 5: Ua Haujlwm Koj NodeMCU:

Nco ntsoov tias koj muaj esp8266 cov laug cam hauv koj Arduino IDE, rub cov lej txuas thiab teeb tsa cov tsev qiv ntawv hauv koj li Arduino IDE, tom qab ntawv teeb koj lub zos wifi SSID & Password thiab GMT raws li koj cheeb tsam hauv tus lej, muab tso rau hauv koj tus tswj. Thaum pib nws yuav qhia cov ntaub ntawv tsis raug txog thaum nws tsim kev sib txuas hauv is taws nem, tos ob peb feeb rau lub sijhawm tshiab thiab hnub tim tshiab, txheeb xyuas cov vis dis aus txuas nrog qhov kev qhia no.

Kauj ruam 6: Nco tseg

Thov qhia thiab sau npe yuav peb cov channel youtube kom muab kev txhawb siab rau peb.

Ua Tsaug

Pom zoo: