Weather Station
Networked weather station: STM32 firmware in C with a custom UART protocol, NeoPixel LED matrix animated via timer and DMA, OLED and stepper-motor dial, fed by a Raspberry Pi.
Summary
| Latest Version | Unknown |
|---|---|
| License | Unknown |
| CI Status | Failing |
| Stars | 1 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2026-10-18 |
| Downloads | 0 |
| Last Indexed | 2026-11-24 09:10 |
Tags
Installation
nimble install Weather Station
choosenim install Weather Station
git clone https://gitlab.com/alkaraan/embedded/stm32/weather-station
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| Weather Station | - | - | - | - | - | - | - | - | - | ✓ |
Source
| Repository | https://gitlab.com/alkaraan/embedded/stm32/weather-station |
|---|---|
| Homepage | https://gitlab.com/alkaraan/embedded/stm32/weather-station |
| Registry Source | gitlab |
README
Networked Weather Station (STM32 and Raspberry Pi)

A Raspberry Pi 5 retrieves weather data for the 16 German state capitals from the OpenWeather API and sends it over a custom UART protocol to an STM32 microcontroller. The STM32 (firmware in C) shows the data in three ways:
- scrolling text on a 32x8 NeoPixel LED matrix
- a weather icon on an OLED display
- the temperature on an analog dial driven by a stepper motor
An IR remote control switches between the cities and changes the scroll speed.
This is a university project from 2024 at HTW Berlin, built in a student team. The STM32 firmware and the Raspberry Pi software were written by me.
What is in it
- Firmware in C on an STM32L432KC with the STM32 HAL (generated with STM32CubeMX).
- NeoPixel driver: the LED matrix is animated frame by frame with a timer and DMA. The scroll speed is selectable at runtime with the remote control, the text direction is configured at build time (right to left is implemented for text), and the display can be extended with more 8x8 modules. German umlauts are supported through UTF-8 decoding.
- Custom UART protocol with a length frame, DMA reception and validation of the message. See docs/uart-protocol.md.
- Analog dial with a stepper motor, calibrated with a rotary encoder.
- Hardware debouncing of the inputs with a Schmitt trigger.
- Raspberry Pi software in Python: weather requests, filtering and conversion into the message format, handling of the remote control inputs.
Hardware
| Component | Role |
|---|---|
| Raspberry Pi 5 | weather requests, remote control input, UART master |
| STM32L432KC | display control and message processing |
| NeoPixel LED matrix 32x8 | scrolling text |
| OLED display (SSD1306-compatible, I2C) | weather icon |
| Stepper motor with dial | analog temperature display |
| Rotary encoder | calibration of the dial |
| SN74HC14N Schmitt trigger | hardware debouncing |
| IR remote control with receiver (4 channels) | city and speed selection, connected to the Raspberry Pi |
Repository layout
firmware/ STM32 firmware (C)
Src/, Inc/ main program, UART handling, module configuration
Neopixel_Lib/ LED matrix driver
Motor_Lib/ stepper motor and rotary encoder
OLED_Lib/ OLED driver (see THIRD_PARTY_NOTICES.md) and weather bitmaps
raspberry-pi/ Python software for the Raspberry Pi
docs/ protocol description and project photo
Build the firmware
The ST drivers (Drivers/) are not included in this repository.
- Install
arm-none-eabi-gccandmake. - Open
firmware/weather_station.iocin STM32CubeMX and generate the code once. This downloads the ST drivers intofirmware/Drivers/. The project sources are already complete, so check withgit diffthat no code outside theUSER CODEsections was changed. - Build with
make -C firmwareand flash the resulting binary with an ST-Link.
Run the Raspberry Pi software
Requirements: Python 3 with pyserial and gpiozero, and the command line tools curl and jq.
- Enable the hardware UART on the Raspberry Pi (
raspi-config, interface options, serial port: no login shell, serial hardware enabled). The software uses/dev/ttyAMA0at 115200 baud. - Get a free API key from OpenWeather and export it:
bash
export OPENWEATHER_API_KEY=your_key_here
- Start the controller:
bash
cd raspberry-pi
python3 controller.py
The four inputs of the remote control receiver are read as buttons on GPIO 22, 27, 23 and 24 (previous or next city, faster or slower scrolling).
License and attribution
The code in this repository is released under the MIT License. Third-party components and data are listed in THIRD_PARTY_NOTICES.md.
Weather data provided by OpenWeather.