Welcome to a collection of practical, beginner-friendly Zephyr RTOS examples designed specifically for STM32 microcontrollers. This repository was created with one simple goal: making Zephyr RTOS more accessible to developers who want to dive into modern embedded development.
Zephyr RTOS is incredibly powerful, but getting started can feel overwhelming. The official documentation is comprehensive, but sometimes you just need working examples that you can build, flash, and see results immediately. That's exactly what this repository provides.
Whether you're coming from Arduino, bare-metal development, or other RTOS platforms, these examples are designed to get you productive with Zephyr quickly. Each project includes:
- Complete, working code that you can build and run immediately
- Step-by-step instructions for setup and deployment
- Clear explanations of what the code does and why
- Porting guidance for using the same concepts on different STM32 boards
- Visual Studio Code integration with the Zephyr extension
Currently, this repository includes:
A comprehensive I2C bus scanner for the STM32F411 BlackPill board. This project demonstrates:
- Basic Zephyr project structure
- I2C driver usage
- UART console output
- Device tree concepts
- Visual Studio Code development workflow
Perfect for: First-time Zephyr users, I2C debugging, understanding Zephyr fundamentals
This repository is actively growing! Here's what you can expect:
- GPIO Control - LED blinking, button handling, interrupt management
- UART Communication - Serial communication between devices
- SPI Interface - Working with SPI sensors and displays
- PWM Generation - Motor control and LED dimming
- ADC Sampling - Reading analog sensors
- Timer Management - Precise timing and scheduling
- Sensor Integration - Real-world examples with popular I2C/SPI sensors
- Display Drivers - OLED and LCD display control
- Networking Examples - When we move to boards with connectivity
- Power Management - Low-power operation techniques
- Code Quality: Examples will be continuously refined based on community feedback
- Documentation: Instructions will be enhanced and clarified over time
- Board Support: Additional STM32 variants and development boards
- Advanced Topics: More complex examples as the foundation grows
- Community Contributions: Pull requests and suggestions are welcome!
- Embedded developers new to Zephyr RTOS
- Arduino users looking to step up to a professional RTOS
- Students learning modern embedded development
- Makers and hobbyists who want reliable, scalable code
- Professional developers needing quick Zephyr reference implementations
- Basic understanding of C programming
- Familiarity with embedded development concepts
- Having read through the Zephyr getting started guide
- Visual Studio Code with the Zephyr extension installed
- Choose an example that matches your hardware and interests
- Follow the detailed README in each project folder
- Build, flash, and experiment with the code
- Modify and extend the examples for your own projects
Found a bug? Have a suggestion? Want to contribute an example? Great! This repository thrives on community input. Whether it's:
- Reporting issues with existing examples
- Suggesting improvements to documentation
- Contributing new example projects
- Sharing success stories or challenges
Your participation makes this resource better for everyone.
If you find these examples helpful, consider:
- ⭐ Starring this repository
- 🐛 Reporting any issues you encounter
- 💡 Suggesting new examples or improvements
- 🔄 Sharing your own modifications and enhancements
These examples build upon the excellent work of the Zephyr Project team and the broader embedded development community. Special thanks to all the developers who make Zephyr RTOS possible and accessible.
Happy coding, and welcome to the world of modern embedded development with Zephyr RTOS!
Remember: Every expert was once a beginner. These examples are here to help you take that next step confidently.