configTime(gmtOffset_sec, daylightOffset_sec, ntpServer); printLocalTime(); WiFi.disconnect(true); WiFi.mode(WIFI_OFF); lcd.clear(); lcd.setCursor(0,1); lcd.print("WiFi discont!"); }
时间: 2023-05-31 12:01:47 浏览: 188
This code sets the time on a device using an NTP server and then prints the current local time on an LCD display. It then disconnects from the WiFi network and turns off the WiFi module. Finally, it clears the LCD display and prints a message indicating that the WiFi has been disconnected.
相关问题
#------------------------------------SpringBoot spring.application.name=SpringBoot-RabbitMQ-Consumer server.port=8091 spring.profiles.active=dev #server.context-path= /zerotrust-demo #??rabbitMQ??? spring.rabbitmq.host=127.0.0.1 spring.rabbitmq.port=5672 spring.rabbitmq.username=guest spring.rabbitmq.password=guest spring.rabbitmq.virtual-host=/ #?????????? spring.rabbitmq.publisher-confirms=true spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://127.0.0.1:3306/zerotrust?autoReconnect=true&serverTimezone=GMT%2B8&characterEncoding=utf8&useSSL=false spring.http.converters.preferred-json-mapper=gson spring.datasource.username=root spring.datasource.password=123456 mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl #mybatis.type-aliases-package=com.atguigu.springbootzerotrust.bean # ???????????? server.servlet.encoding.charset=utf-8 server.servlet.encoding.force=true server.servlet.encoding.enabled=true
这是一个Spring Boot应用程序的配置文件,其中包含了多个配置项。其中,应用程序的名称为"SpringBoot-RabbitMQ-Consumer",端口号为8091,激活了"dev"环境的配置文件。RabbitMQ的连接配置包括了主机名、端口号、用户名、密码和虚拟主机等信息。此外,还包括了MySQL数据库的连接配置,包括驱动类名、URL、用户名和密码等信息。同时,还设置了使用Gson作为首选的JSON解析器,以及字符编码的相关配置。
配置所有设备的时区为GMT+08:00,调整SW1时间为实际时间,SW1配置为ntp server,其他设备用SW1 loopback1 ipv4地址作为ntp server地址, ntp client 请求报文时间间隔1分钟
步骤如下:
1. 配置所有设备的时区为GMT+08:00:
```
conf t
clock timezone GMT+8 8
```
2. 调整SW1时间为实际时间,配置SW1为ntp server:
```
conf t
ntp master
```
3. 配置其他设备使用SW1的loopback1接口IP地址作为ntp server地址:
```
conf t
ntp server <SW1的loopback1接口IP地址>
```
4. 配置ntp client请求报文时间间隔为1分钟:
```
conf t
ntp update-calendar
ntp refresh-interval 1
```
注意:在配置ntp server和ntp client时,要确保网络连通,以便ntp client能够同步到ntp server的时间。
阅读全文