Add Network hygrometer improved articles made of the temperature and humidity curve

Foreword

In the self network hygrometer mentioned in the article can be improved method is to add to the curve of temperature and humidity, then the programming ideas according to the temperature and humidity is required into an array or list data is then stored again drawn graph.
Here it, flipped through the official documents lighting technology, there are ways you can see a cloud storage, just to solve the problem of storage temperature and humidity data directly take over with it. Relatively simple, the following do you use this method to achieve this function.


Look at the renderings:

Here Insert Picture Description

text

Refer to lighting technology official website of cloud storage methods , give some understanding of my own here.
1. Cloud store data
  cloud storage data herein supports only networked devices, will suddenly increase if the hygrometer off off network, the data is not stored in the trend graph will suddenly drop, reconnect. Cloud storage function here is not very strong, if you modify the code, then re-upload the program before the data cloud storage will be cleared.
2. DETAILED function
(1) cloud data storage functions:

void dataStorage()//云存储温湿度数据函数
{
    Blinker.dataStorage("temp", temp_read);//存储温度
    Blinker.dataStorage("humi", humi_read);//存储湿度
}

Function body Blinker.dataStorage("temp", temp_read);first argument is the name of the data key, to display the icon at the mobile phone side, the second parameter is a data variable to be stored.
(2) function is written in the code, call this function in the main loop, the function is as follows:

Blinker.attachDataStorage(dataStorage);

This function means that each cycle when it will call the above dataStorage function, achieve the effect of cloud storage data can be obtained every time.
3. Add components
add a chart component blinker mobile terminal, input data corresponding to keys on it.


Published 19 original articles · won praise 29 · views 10000 +

Guess you like

Origin blog.csdn.net/JIANGYINGH/article/details/105414517