On Event
The On Event feature allows developers to raise events in the event bus, enabling interaction with various components of the micro:bit. This advanced API is essential for creating responsive applications that react to user inputs or sensor data.
Key Features:
- Event Handling: Capture and respond to events triggered by buttons or other sources.
- Integration: Works seamlessly with the micro:bit's message bus for efficient communication between components.
- Advanced Usage: Ideal for developers looking to implement complex interactions in their projects.
Use Cases:
- Interactive Games: Create games that respond to button presses or sensor inputs.
- Educational Projects: Teach programming concepts through hands-on projects that utilize event-driven programming.
- Sensor Applications: Build applications that react to environmental changes, such as temperature or light levels.

