Welcome to the Zephyr Weather Assistant Project! 🚀
This innovative project harnesses the power of Zephyr RTOS to create a dynamic Weather Assistant. 🌐 Get real-time weather updates from an external API, including reliable data from [Open Meteo]](https://open-meteo.com/). Simultaneously, gather local ambient conditions displaying this comprehensive information on a user-friendly display.
Witness the incredible versatility of Zephyr RTOS as it seamlessly executes the same codebase across diverse hardware environments. Starting with STM32 and expanding further, explore how Zephyr allows the same Weather Assistant code to run on various boards and peripherals, demonstrating adaptability and scalability.
The proyect will cover from a the basics of a main loop to advanced topics like thread management, memory sharing, sensor drivers, and display libraries (LVGL), we'll cover it all. Future plans include integrating local weather forecasts and even exploring voice control with TensorFlowLite.
Ensure you have the following dependencies installed on your system:
- Git
- CMake
- Ninja
- python
- devicetree compiler
- Toolchain appropriate for your target architecture (see Install Zephyr SDK section)
Follow the Zephyr documentation for detailed instructions based on your operating system.
Open your terminal and run the following command:
git clone https://github.com/zephyrproject-rtos/zephyr.git
check out the branch into version 4.0.0 to get a stable Zephyr version instead of developing directly into main:
git checkout v4.0.0-branch
The Zephyr SDK can be downloaded from the official Zephyr repository. Download the v0.17.0 version which is the suitable SDK for Zephyr 4.0.0 release. However, I recommend to use the new west sdk install
tool, with this simple command the proper SDK will be installed.
Navigate to your project directory and run:
west init -m https://github.com/zephyrproject-rtos/zephyr
west update
In order to use the WIFI interface, you need to set your WIFI setting in the src/wifi.h
file. The SSID and password must be specified in the following macros:
#define WIFI_SSID "<SSID>"
#define WIFI_PSK "<PASSWORD>"
Choose your board by running:
west build -b <your_board>
The first version of the weather assistant is developed for STM32L4S5 board with the display ssd1306_128x64
. Then, run the following command:
west build -b b_l4s5i_iot01a --shield ssd1306_128x64
Flash it to your board with:
west flash
- based code for STM32L4S5 board (basic Zephyr structure)
- Read temperature and humidty from bme280 sensor
- Display local ambient conditions in ssd1306 display
- Internet connection for STM32L4S5
- Get weather condition from HTTP API: open-meteo
- Added a button
- display manager to change views pressing a button
- Display weather condition and local ambient conditions in the display