SHT30 có độ chính xác cao, đầu ra kỹ thuật số được hiệu chỉnh đầy đủ, tuyến tính hóa và bù nhiệt độ. Shield cảm biến nhiệt độ và độ ẩm kỹ thuật số cho board WiFi WeMOS-D1 ESP8266.
Thông số kỹ thuật:
- Giao tiếp I2C
- Có hai địa chỉ I2C có thể lựa chọn
- Độ chính xác ±3%RH and ±0.3°C
- Thiết kế dưới dạng Shield tách biệt
- Lỗ lắp Φ2mm
Sơ đồ chân:
Code tham khảo Arduino:
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <WEMOS_SHT3X.h>#define OLED_RESET 0 // GPIO0
Adafruit_SSD1306 display(OLED_RESET);SHT3X sht30(0x45);
void setup() {
Serial.begin(115200);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}
void loop() {
// Clear the buffer.
display.clearDisplay();
display.setTextSize(1);
display.setCursor(0, 0);
display.setTextColor(WHITE);if(sht30.get()==0){
display.println("T: ");
display.setTextSize(2);
display.println(sht30.cTemp);display.setTextSize(1);
display.println("H: ");
display.setTextSize(2);
display.println(sht30.humidity);
}
else
{
display.println("Error!");
}
display.display();
delay(1000);
}
Tài liệu tham khảo:
Video tham khảo: