Difference between revisions of "Pico-WiFi-Air-Monitoring"
From SB-Components Wiki
Line 39: | Line 39: | ||
* To obtain the API key visit: https://thingspeak.com/ and register an account. | * To obtain the API key visit: https://thingspeak.com/ and register an account. | ||
− | * create a channel by visiting My Channels-->New Channel then enable the fields as shown below and click on save channel button. | + | * create a channel by visiting My Channels-->New Channel then enable the fields as shown below and click on the save channel button. |
− | |||
− | * now click on API key tab and copy the API key and paste it in '''"Send_data_Thingspeak.py"''' as | + | [[File:Thinkspeak_channel_creation.PNG]] |
+ | |||
+ | * now click on the API key tab and copy the API key and paste it in '''"Send_data_Thingspeak.py"''' as mentioned above. | ||
* Now click on the green play button in thonny to run the code. | * Now click on the green play button in thonny to run the code. | ||
− | * you can click on private view tab on your | + | * you can click on the private view tab on your thingspeak dashboard to monitor your pico wifi air monitoring data. |
== Resources == | == Resources == |
Revision as of 10:39, 29 October 2021
Pinout
Installation
MicroPython
- Stack Raspberry Pi Pico on the female header of Pico Air Monitoring Expansion.
- Connect USB cable on Raspberry Pi Pico USB port.
- Choose interpreter as MicroPython (Raspberry Pi pico).
- Download Pico air monitoring expansion repository from the below link:
Source code: https://github.com/sbcshop/Pico-Air-Monitoring-Expansion
- open Thonny IDE and create 3 new files as "ssd1306.py" , "pmsa003.py" and "bme280.py" with the same content of the file you have downloaded from the above repository or you can also save these 3 files in raspberry pi pico from the file menu -> save as and select raspberry pi pico
- open "Send_data_Thingspeak.py" and edit the below lines:
WiFi_SSID='WiFi_SSID' # Wifi_SSID
WiFi_password = 'WiFi_Password' # WiFi Password
Port = '80' # Thingspeak port
API_KEY = "Thingspeak_Write_API"
- To obtain the API key visit: https://thingspeak.com/ and register an account.
- create a channel by visiting My Channels-->New Channel then enable the fields as shown below and click on the save channel button.
- now click on the API key tab and copy the API key and paste it in "Send_data_Thingspeak.py" as mentioned above.
- Now click on the green play button in thonny to run the code.
- you can click on the private view tab on your thingspeak dashboard to monitor your pico wifi air monitoring data.