The Pimoroni Enviro+ is an excellent piece of kit that boast numerous sensors, inputs and outputs. (Such as BME280 temperature, pressure, humidity sensor, LTR-559 light and proximity sensor, MICS6814 analog gas sensor, ADS1015 analog to digital converter (ADC). You can see more details here. It even has a small 0.96 colour LCD screen.
I wanted to create a project where I could collect data from the sensors and then display this data in real time. Thanks to @ who pointed me in the direction of Adafruit's.io. A really simple way to send data to a visualisation Dashboard which is sweet and looks cool. You can see my Dashboard here: |
|
Setting up Adafruit.io |
Setting up Feeds |
Creating a Dashboard |
Using Python to send the data |
Creating the Box |
Adafruit.IO makes it really easy to use Python code to extract the data from the Raspberry Pi and then push it to a Dashboard. This is done with the use of 'feeds' which are updated in real to with the Sensor readings from the Pi. These feeds are then used to build the Dashboard.
First install the Python module: pip3 install adafruit-io To send the data to the feeds you use the code: # Import library and create instance of REST client. from Adafruit_IO import Client aio = Client('YOUR ADAFRUIT IO USERNAME', 'YOUR ADAFRUIT IO KEY') # Add the value 98.6 to the feed 'Temperature'. test = aio.feeds('test') aio.send_data(test.key, 98.6) More details and a worked examples are shown in the videos above. You can download my starter version of the program here The full Adafruit.IO docs and guides are here: |
|