A simple weather station that uses a Raspberry Pi Pico W and sensors to collect temperature, humidity, pressure and light data. The data is then sent to a cloud service (Azure IoT Hub) for storage and visualization.
A ML model is used to predict the weather based on the collected data. The model is trained using a dataset of weather data from Kaggle.
- Clone the repository
- Create a virtual environment for the server and install the required packages
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt- Create a
config.jsonfile inside the server directory with the following content:
{
"CONNECTION_STRING": "<your-iot-hub-connection-string>",
}- Create a
config.jsonfile in the root directory and upload it to the Raspberry Pi Pico W:
{
"WIFI_SSID": "<your-wifi-ssid>",
"WIFI_PASSWORD": "<your-wifi-password>",
"SERVER_URL": "<your-server-url>",
}- Upload the BME280 and lcd libraries to the Raspberry Pi Pico W
- Run the server
flask run --host=0.0.0.0- Run the main.py script on the Raspberry Pi Pico W
- Raspberry Pi Pico W
- BME280 sensor
- LDR sensor
- LCD display 16x2
- MicroPython
- Azure services (IoT Hub, Stream Analytics, Power BI)