Nebble provides two complementary sets of examples:
Official Pebble SDK examples ported to demonstrate how Nebble's high-level API maps to C code. Perfect for developers migrating from C or wanting C-SDK parity.
Repository: ported-examples
| Example | Type | Key Features |
|---|---|---|
| simple_analog | Watchface | GPath, custom drawing, trigonometry, responsive layout |
| ks_clock_face | Watchface | Custom AnimationImplementation, UnobstructedArea (Quick View), animations |
| classio_battery_connection | Watchface | Battery events, Bluetooth status, FixedString formatting |
| time_dots | Watchface | Radial graphics, custom layer drawing, platform-adaptive colors |
| feature_persist_counter | App | Persistent storage, ActionBarLayer, click handling |
| feature_accel_discs | App | Accelerometer physics, collision detection, round display support |
| feature_custom_font | App | Custom fonts (GFontRef), resource loading, ARC-managed handles |
| feature_image_transparent | App | GBitmap, BitmapLayer, compositing modes, transparency |
| pdc_image | App | PDC vector graphics, GDrawCommandImage, resource centering |
| content_indicator_demo | App | ScrollLayer, ContentIndicator configuration, managed handles |
Examples written in idiomatic Nim, demonstrating Nebble-specific features and patterns not present in C Pebble development.
Repository: nebble-examples
| Example | Type | Key Features |
|---|---|---|
| hello_world | App | Declarative nebbleApp DSL, text layers, click handlers |
| animation_demo | App | PropertyAnimation, event-driven sequences, animation handlers |
| comms_demo | App | Full-stack Nim with phone-side PKJS logic, typed AppMessage |
| health_watchface | Watchface | Health service integration, activity metrics, background data |
| glance_menu_demo | App | AppGlance API, dynamic menu callbacks, timeline integration |
| menu_demo | App | SimpleMenuLayer, sections, selection handling, item callbacks |
| vibes_demo | App | Vibes API, vibration patterns, haptic feedback |
To build and run an example:
Clone the examples repository:
git clone https://github.com/Brokezawa/ported-examples # For C SDK parity git clone https://github.com/Brokezawa/nebble-examples # For Nebble native
Navigate to the example directory:
cd ported-examples/simple_analog # or nebble-examples/hello_world
Build for all platforms:
nebble build
Install to the emulator:
nebble install --emulator basalt