Q2Uj0iN6p

Multifunctional desktop clock based on ESP-WROOM-32

 
Overview
* 1. Project Function Introduction This project uses the ESP-WROOM-32 as the main control chip and a 1.8-inch TFT screen for display. The PCB size is 80mm*50mm. The power supply uses the SY8088, a DC/DC regulator capable of providing up to 1A of output current. Power charging and discharging management uses the TP4057. An interface for a JW01 gas detection module is reserved for future upgrades. * 2. Open Source License MIT License *3. Hardware Part Hardware Part: MCU main controller, temperature and humidity sensor, DCDC step-down, charge and discharge management, and 1.8-inch TFT display screen The effect produced tft.println(str); } WiFi and NTP const char *ssid = "your own WiFi"; //WiFi account const char *password = "your own WiFi password"; //WiFi password WiFiUDP ntpUDP; NTPClient timeClient(ntpUDP,"cn.pool.ntp.org"); //NTP server address void get_wifi() { // Connect to the network WiFi.begin(ssid, password); //Wait for WiFi connection while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); //Connection successful Serial.print("IP address: "); //Print IP address Serial.println(WiFi.localIP()); } timeClient.begin(); // Set the offset time (in seconds) to adjust the time zone, for example: // GMT +1 = 3600 // GMT +8 = 28800 timeClient.setTimeOffset(28800); SHT4x Temperature and Humidity Sensor // SHT40 Temperature and Humidity Sensor Configuration and Initialization Code #define SHT4X_SDA_PIN 21 #define SHT4X_SCL_PIN 22 Adafruit_SHT4x sht4 = Adafruit_SHT4x(); void SHT4x_Init() { Wire.begin(SHT4X_SDA_PIN, SHT4X_SCL_PIN); if (!sht4.begin()) { Serial.println("Couldn't find SHT4x");//Try initializing the SHT4x sensor. If it fails, print the error message and enter an infinite loop while (1) delay(1); } Serial.println("Found SHT4x sensor"); Serial.print("Serial number 0x"); Serial.println(sht4.readSerial(), HEX); sht4.setPrecision(SHT4X_HIGH_PRECISION);//Set the sensor precision switch (sht4.getPrecision()) { case SHT4X_HIGH_PRECISION: Serial.println("High precision"); break; case SHT4X_MED_PRECISION: Serial.println("Med precision"); break; case SHT4X_LOW_PRECISION: Serial.println("Low precision"); break; } sht4.setHeater(SHT4X_NO_HEATER);//Disable the sensor's heater function. switch (sht4.getHeater()) { case SHT4X_NO_HEATER: Serial.println("No heater"); break; case SHT4X_HIGH_HEATER_1S: Serial.println("High heat for 1 second"); break; case SHT4X_HIGH_HEATER_100MS: Serial.println("High heat for 0.1 second"); break; case SHT4X_MED_HEATER_1S: Serial.println("Medium heat for 1 second"); break; case SHT4X_MED_HEATER_100MS: Serial.println("Medium heat for 0.1 second"); break; case SHT4X_LOW_HEATER_1S: Serial.println("Low heat for 1 second"); break; case SHT4X_LOW_HEATER_100MS: Serial.println("Low heat for 0.1 second"); break; } }
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-27 20:03:00

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号