📄️ Creating a Custom Module
This is where the fun begins! This tutorial will guide you through creating your own reusable, plug-and-play Nextino module from scratch. We will build a ButtonModule that demonstrates all the core best practices:
📄️ Safe Hardware Access
Have you ever spent hours debugging a project, only to realize that two different modules were trying to use the same pin? 🤯 It's a common and frustrating problem in embedded development.
📄️ Using the EventBus
You've created a self-contained module, but the true power of a modular framework is unlocked when modules can communicate. In Nextino, the primary way to achieve decoupled, one-to-many communication is through the EventBus. 📢
📄️ Using the ServiceLocator
While the EventBus is perfect for broadcasting notifications (one-to-many), sometimes you need one module to directly command a specific instance of another module (one-to-one). This is where the ServiceLocator shines. 🎯
📄️ Wrapping Existing Libraries
One of Nextino's greatest strengths is that you don't have to reinvent the wheel! You can take powerful, popular Arduino libraries and "wrap" them into a Nextino module. This gives you the best of both worlds: the robust, community-tested features of the library and the structure, safety, and scalability of the Nextino framework.