5505 views|12 replies

96

Posts

0

Resources
The OP
 

Network clock for esp8266 [Copy link]

 
 
This post was last edited by youxinweizhi on 2018-2-12 17:36 I haven't posted for a long time, waiting for the holiday. . I'm bored and wrote a post about the network clock. Welcome to correct me. 1. As usual, I'll post a picture of the final effect first 2. The accessories are as follows: esp8266 board, lcd5110, a data cable, a breadboard, a power bank, and some Dupont cables 3. Principle: Turn on the computer and connect to wifi, and get the current time through the API. Then pass an internal function to loop. In order to ensure the accuracy of the time, the time is automatically corrected every hour. 4. Code: def connectWifi(ssid,passwd): global wlan wlan=network.WLAN(network.STA_IF) wlan.active(True) wlan.disconnect() wlan.connect(ssid,passwd) while(wlan.ifconfig()[0]=='0.0.0.0'): time.sleep(1) return True H=None M=None S=None def get_time(): global H global M global S URL="http://quan.suning.com/getSysTime.do" res = urequests.get(URL).text j = json.loads(res) list=j['sysTime2'].split()[1] H=int(list.split(":")[0]) M=int(list.split(":")[1]) S=int(list.split(":")[2]) def data(M,S): for m in range(M,50): for x in range(S,60): This content is created by EEWORLD forum user youxinweizhi, if you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source


Latest reply

The library is missing, where can I download it?  Details Published on 2018-5-29 15:28

赞赏

1

查看全部赞赏

 
 

2002

Posts

24

Resources
2
 
1. I'm curious about how you found Suning's time json interface. 2. What about the weather temperature shown below?
 
 
 

1w

Posts

25

Resources
3
 
Like
 
 
 

4177

Posts

9

Resources
4
 
Two questions: 1. Can ESP8266 drive a 5110 screen? This is the first time I know this. Thanks for your advice. 2. ESP8266, what IED did you use to develop it, eclipse? Or something else? Is there any faster way to develop it? I feel that my progress is quite slow when I do it privately.

Comments

1. As long as the IO is sufficient, it is fine. This method is not advisable. The IoT module should have the gameplay of the IoT.  Details Published on 2018-2-13 11:00
 
 
 

96

Posts

0

Resources
5
 
huaiqiao posted on 2018-2-13 10:47 Two questions: 1. Can ESP8266 drive a 5110 screen? This is the first time I know this. I am grateful for your advice. 2. ESP8266, what IED do you use...
1. As long as the IO is sufficient, it will be fine. This method is not advisable. The IoT module should have the gameplay of the IoT. 2. As for the IDE, just use whatever you are comfortable with. I use whatever I have on hand.

Comments

Why is this method not advisable?  Details Published on 2018-2-13 11:20
 
 
 

4177

Posts

9

Resources
6
 
youxinweizhi posted on 2018-2-13 11:00 1. As long as the IO is sufficient, it is fine. This method is not advisable. The IoT module should have the gameplay of the IoT. 2. As for IDE, you can do it yourself. I...
Why do you say this method is not advisable?

Comments

All monitored data is posted to the server, so the entire mobile app will be more convenient.  Details Published on 2018-2-13 11:29
 
 
 

96

Posts

0

Resources
7
 
huaiqiao posted on 2018-2-13 11:20 Why is this method not advisable?
If all monitored data is posted to the server, wouldn't it be more convenient for the entire mobile app?

Comments

Oh, I thought you said that the IO driving 5110 screen method is not advisable. I thought you had other ways to drive the 5110 screen.  Details Published on 2018-2-13 11:37
 
 
 

4177

Posts

9

Resources
8
 
youxinweizhi posted on 2018-2-13 11:29 If all monitored data is posted to the server, wouldn't it be more convenient to use the entire mobile app?
Oh, I thought you said that the IO drive 5110 screen method is not advisable. I thought you had other ways to drive the 5110 screen.
 
 
 

1903

Posts

0

Resources
9
 
Not bad
 
 
 

277

Posts

0

Resources
10
 
Personal signature我爱大清国我怕它完了可谁爱我啊
 
 
 

2

Posts

0

Resources
11
 
This post was last edited by smdrv on 2018-2-24 13:23 May I ask which port of the ESP8266 should the 5110 screen be connected to? Thank you!

Comments

SPI interface.  Details Published on 2018-2-27 12:29
 
 
 

96

Posts

0

Resources
12
 
smdrv posted on 2018-2-24 10:47 May I ask which port of ESP8266 should the 5110 screen be connected to? Thank you!
SPI interface.
 
 
 

32

Posts

0

Resources
13
 
The library is missing, where can I download it?
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list