功能介绍:1、通过Blinker读取和统计温湿度历史数据;2、小爱同学查询温湿度;
硬件:SHT30传感器、ESP8266
程序介绍:第一部分为blinker界面配置(可复制到blinker APP内,直接配置界面);第二部分为SHT3x.h库的内容;第三部分为arduino编译的程序(如果没有库,复制命名为SHT3x.h然后放在和arduino程序同一个文件夹里),第三部分为blinker界面配置(可复制到blinker APP内,直接配置界面)
界面配置:
{¨config¨{¨headerColor¨¨transparent¨¨headerStyle¨¨dark¨¨background¨{¨img¨¨assets/img/headerbg.jpg¨¨isFull¨«}}¨dashboard¨|{¨type¨¨num¨¨t0¨¨温度¨¨ico¨¨fad fa-thermometer-three-quarters¨¨clr¨¨#389BEE¨¨min¨É¨max¨¤o¨uni¨¨°C¨¨bg¨É¨cols¨Í¨rows¨Ë¨key¨¨temp¨´x´É´y´Ñ¨speech¨|÷¨lstyle¨Ê}{ßAßBßC¨湿度¨ßE¨fad fa-humidity¨ßGßHßIÉßJ¢1cßK´%´ßMÉßNÍßOËßP¨humi¨´x´Í´y´ÑßR|÷ßSÊ}{ßA¨cha¨ßMɨsty¨¨line¨ßG¨#EA0909¨¨sty1¨ßY¨clr1¨¨#076EEF¨¨sty2¨ßY¨clr2¨ßHßNÑßOÍßPßQ´x´É´y´¤AßR|÷¨key2¨´´¨key0¨ßQßCßD¨t1¨ßT¨key1¨ßVßSÊ}÷¨actions¨|¦¨cmd¨¦¨switch¨‡¨text¨‡¨on¨¨打开?name¨¨off¨¨关闭?name¨—÷¨triggers¨|{¨source¨ßl¨source_zh¨¨开关状态¨¨state¨|ßnßp÷¨state_zh¨|¨打开¨¨关闭¨÷}÷}
库文件:<SHT3x.h>
/*
Arduino library for Sensirion temperature and humidity sensors SHT30, SHT31 & SHT35.
the heavy version.
Check for /examples for examples of different use cases.
The datasheet I followed is:
https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Sensirion_Humidity_Sensors_SHT3x_Datasheet_digital.pdf
For more simple version check the SimpleSHT3x library.
The constructor structure:
SHT3x( int Address = 0x44, //I2C device address, 0x44 or 0x45
ValueIfError Value = Zero, //What to return in case of errors. Zero or PrevValue
uint8_t HardResetPin = 255, //Number of pin RESET connected to (input from 100 to 255 if not used)
SHT3xSensor SensorType = SHT30, //Sensor type