2067 views|1 replies

1297

Posts

2

Resources
The OP
 

【NXP Rapid IoT Review】W3 Environmental Data Collection [Copy link]

In the W2 review, the author used the existing samples to introduce the general environment of the web IDE. But if you want to use this environment to implement your own development, what should you do? This week, I will introduce how to use this web IDE to collect environmental data and display it on the screen. I thought it was a very simple process, but it didn't go smoothly after a long time. Let me explain it slowly. If you see the problem, please give me some advice. First, create a new NXP Rapid IoT project on the studio page. You will see a blank page. Before continuing the following development, you need to go through the program flow first, and then convert it into the language of the web IDE. If you use the elementary one, it is a while loop, reading data, updating screen data, delay. The reason why this is called elementary is that delay is often useless, so a more reasonable approach is that after the while loop updates the data, it enters a low-power state and starts the timer at the same time. After a specified time, it is awakened by the timer interrupt and restarts the cycle of reading data and updating data. And such a process is more suitable for web IDE to express. Here, what this timing does is done by the interval element. As shown in the figure below, click on the interval on the right to add a timing element. You can modify its characteristics, but use the default value for now. Use the same method to place a ccs811 to collect air quality, and then add a Text to display the value. As shown in the figure below However, this still does not work properly, and a data flow connection needs to be made before and after. Point the mouse to the edge of interval, click with the left key, and drag it to the icon of ccs811. After releasing it, you will see a blue arrow, which means that a connection has been established between interval and ccs811. At this time, click interval, and you can see that an event is automatically added, reading TVOC. Similarly, add a data stream to ccs811, which is very intuitive. What's next? Save, compile, download, and see the effect. The result is infinite restart, and only the NXP and atmosphere interfaces can be seen! ! It seems that the posts of other people on the board are similar! ! I can't figure it out. The hateful thing is that this web IDE is very picky about the network, and it will fail at any time. After compiling and downloading once, it will never respond again. Try to restart the browser and change to read CO2, but it still doesn't work. Change the sensor and it still doesn't work. I switched back to ccs811, and changed both instance and mode to 2 according to the weather station, but it still didn't work. I noticed a detail at this time. In the sample, the instance, address and mode of ccs811 are all optional, but the items of css811 that I added cannot be changed. How strange. It can't be that the hardware is broken? The following is the sample The following is what I added I burned the weather station directly, started it normally, and the temperature, humidity and air pressure had data and changed, but the air quality and light were always 0! I went back to get my phone to take a photo, and found that the light was back. It turned out that the update was slow? Finally, I deleted all other things in the weather station, leaving only interval and css811, then changed page to text, burned it, and it could display tvoc. After it was displayed, it restarted again after a while! ! ! I spent a whole day testing downloads, testing, waiting, and downloading. I still couldn't find the reason for the restart. I originally planned to play with process control, but I will put it aside for the next time! Summary: 1. Slow, it takes a long time to save and compile. The key is to follow this process. Don't save, download directly, or it will be before the modification. In this way, you have to keep an eye on it, otherwise you don't know if it has been saved and compiled. What if there is an error due to poor network? 2. The compiled firmware is huge, basically more than 400K, and it only completes this function? The key is that the firmware only increases by a few KB when adding multiple sensors and BLE connection capabilities. This shows that most of the space is used to store some public things, such as two advertisements? 3. It seems easy to get started, but I don’t see the function of process control. So if you want precise control, it is not enough to rely on pictures alone. I have read many posts on the board, and the in-depth ones are basically changing the code.

305.png (51.5 KB, downloads: 0)

305.png

306.png (17.24 KB, downloads: 0)

306.png
This post is from RF/Wirelessly
 

1297

Posts

2

Resources
2
 
Latest report, change the text to labelled icon, no need to restart, it can be displayed normally. What the hell is this!

This post is from RF/Wirelessly
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

快速回复 返回顶部 Return list