|
沙发
楼主 |
发表于 2022-4-30 17:13:18
|
只看该作者
while(1)
{
BEEP=1;
DHT11_Read_Data(&wdh,&wdl,&sdh,&sdl);
light=read_BH1750();
shidu=Get_Adc_Average(1,10);
temperature=DS18B20_Get_Temp();
userHandle();//数据上行
void userHandle(void)
{
/*
currentDataPoint.valuewd = ;//Add Sensor Data Collection
currentDataPoint.valuesd = ;//Add Sensor Data Collection
currentDataPoint.valueshidu = ;//Add Sensor Data Collection
currentDataPoint.valuelight = ;//Add Sensor Data Collection
currentDataPoint.valuetemperature = ;//Add Sensor Data Collection
*/
currentDataPoint.valueshidu = shidu;//土壤湿度
currentDataPoint.valuewd = wdh;//空气温度
currentDataPoint.valuesd = sdh;//空气湿度
currentDataPoint.valuelight =light;//光照强度
currentDataPoint.valuetemperature = temperature/10;//土壤温度 |
|