| Electronic Components Datasheet Search |
|
DFR0654 Datasheet(PDF) 85 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0654 Datasheet(HTML) 85 Page - DFROBOT |
|
85 / 122 page ![]() 2023/10/12 11:00 FireBeetle_Board_ESP32_E_SKU_DFR0654-DFRobot https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654 85/122 #include <WiFi.h> const char* ssid="WIFI_SSID"; //Fill in the WIFI name const char* password="WIFI_PASSWORD"; //Fill in the WIFI password const char* ntpServer = "pool.ntp.org"; //Get the time from the network time server const long gmtOffset_sec = 28800; //UTC time is used here, China is in the UTC+8 time zone, which is 8*60*60 const int daylightOffset_sec = 0; //Use daylight saving time daylightOffset_sec = 3600, otherwise it is equal to 0 void printLocalTime(){ struct tm timeinfo; if(!getLocalTime(&timeinfo)){ //If the local time is obtained, put it into the timeinfo structure Serial.println("Failed to obtian time"); return ; } Serial.println(&timeinfo,"%A, %B %d %Y %H:%M:%S"); //Output the obtained time in this format } void setup() { Serial.begin(115200); Serial.printf("Connecting to %s",ssid); WiFi.begin(ssid,password); //Connect to WIFI while(WiFi.status()!=WL_CONNECTED){ //Wait for the connection to be successful delay(500); Serial.print("."); } Serial.println(" CONNECTED"); configTime(gmtOffset_sec, daylightOffset_sec, ntpServer); /Configure network time as the system time of the ESP32-E mainb } void loop() { |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |