8. iot:kit case03: An environmental quality monitoring station¶
8.1. Our goal¶
Let’s make an environmental quality monitoring station.
What is the environmental monitoring¶
Environmental monitoringn Environmental monitoring is to design environemntal monitoring and display & save the collected information by using of GIS, it can also give a detailed analysis towards it’s monitoring spot.
8.4. Hardware connection¶
As below picture, let the light sensor be connected to
Let the BME280 module be connected to
SDA-P20 of the
Let the onboard RTC be connected to
Click on “Advanced” in the MakeCode Drawer to see more code sections.
We need to add an extension for coding to the IOT. Click on the “Extension” at bottom of coding drawer, then Search for “IOT” and click on the IOT package to add it to your project. (As below picture)
Note：If you get a warning telling you some packages will be removed because of incompatibility issues, either follow the prompts or create a new project in the Project file menu.
initialize OLED in to the
on start, initialize OLED screen pixels to
show string and
show number blocks into the
forever in turn.
Display current light intensity, humidity and temperature.
Then, snap into the
If you don’t want to type these code by yourself, you can directly download the whole program from the link below:
The light intensity, temperature and humidity are displayed every minute.
How do you count the data in a day ?