描述
<h3>* 1、项目功能介绍</h3>
<hr>
<p>ESP8266+sht30+0.91oled温湿度检测</p>
<h3>* 2、项目属性</h3>
<hr>
<p><span style="color:rgb(37, 41, 51)">本项目为首次公开,为本人原创,未曾在别的比赛中获奖。</span><br>
<br></p>
<h3>* 3、开源协议</h3>
<hr>
<p>MIT</p>
<h3>* 4、硬件部分</h3>
<p>ESP-12F
<img src="//image.lceda.cn/pullimage/uSPd3Il12sV27gheY1chM1HdJCGlG8K7DiNHgFr4.png" alt="736b15865e1c2175db602e2eebecb7b.png">
CH340K
<img src="//image.lceda.cn/pullimage/QogWuyY3cu1UiPEzBj8B26z6vfJx4NCDGeTl02ZN.png" alt="47df68e6d974eaae04d2c1cc3ffb2f4.png">
电源
<img src="//image.lceda.cn/pullimage/BobrcYBI9ldb2jITh93AlcLRaeyfylKYse9FxpHq.png" alt="c67d79b62138d042248754c35bdee22.png"></p>
<p><img src="//image.lceda.cn/pullimage/f5rJfiF7ke21NN6MqTLOAeN0Zaj2sF7dmZcNpCoE.png" alt="a1f7c942896c0ec51f0714bf12ad9e2.png">
sht30
<img src="//image.lceda.cn/pullimage/dltBoKI6vPhSwnlHrVravMnUzxsyfmV2FCrUkpkj.png" alt="80e8fa0f6b41d34a5e9980b50e1ea6e.png">
14pin 0.91寸 oled屏
<img src="//image.lceda.cn/pullimage/rmENbV9bQrv4Qpj68YwkZfD4hE1nwqPpPmCBObHf.png" alt="5301d441eb9076e0cdc8280455bd579.png">
预留按键
<img src="//image.lceda.cn/pullimage/DejD5R39oFQOnwWWPVO1C8LcPR37pUs4qI6vCoRG.png" alt="f070e67dc7ba4c40a42469370dda28c.png"></p>
<h3>* 5、软件部分</h3>
<hr>
<p>vscode+platformio开发
天气时钟部分请参考此<a href="https://blog.csdn.net/chachapaofan/article/details/121716446" target="_blank">文章</a></p>
<pre><code>#include
#include
#include
#include
// 初始化u8g2库
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
Adafruit_SHT31 sht30 = Adafruit_SHT31();
void setup() {
Serial.begin(115200);
// 初始化OLED
u8g2.begin();
// 初始化SHT30
if (!sht30.begin(0x44)) {
Serial.println("SHT31 sensor not found");
while (1) delay(1);
}
}
void loop() {
float temp = sht30.readTemperature();
float humi = sht30.readHumidity();
// 开始绘制OLED显示内容
u8g2.firstPage();
do {
u8g2.setFont(u8g2_font_ncenB08_tr); // 设置字体
u8g2.drawStr(0, 12, "Temp:"); // 显示温度标题
u8g2.setCursor(40, 12);
u8g2.print(temp, 1); // 显示温度值
u8g2.print(" C");
u8g2.drawStr(0, 24, "Humi:"); // 显示湿度标题
u8g2.setCursor(40, 24);
u8g2.print(humi, 1); // 显示湿度值
u8g2.print(" %");
} while ( u8g2.nextPage() );
delay(2000);
}</code></pre>
<h3>* 6、BOM清单</h3>
<hr>
<p>见详情</p>
<h3>* 7、大赛LOGO验证</h3>
<hr>
<p><img src="//image.lceda.cn/pullimage/jEWxdh7j93whFW52FdiRUDUOtWsYWu4BJjKt6Voz.jpeg" alt="a826dceb4a604723dfcbb7232bd024b.jpg"></p>
<h3>* 8、演示您的项目并录制成视频上传</h3>
<hr>
评论(0)