2 stable releases
2.1.1 | Oct 23, 2020 |
---|---|
1.0.0 | Oct 21, 2020 |
#1433 in Embedded development
2.5MB
108 lines
Hand-Drawn Watch Face for Rust + Mynewt on PineTime Smart Watch
Preview this Watch Face in your web browser
Hand-drawn Rust Watch Face for PineTime Smart Watch with LVGL and Mynewt...
-
Bluetooth LE Time Sync
-
Time only, no date
-
Digits rendered as bitmaps (See the graphics assets)
Built with pinetime-watchface
framework for watch faces.
To select this watch face in the pinetime-rust-mynewt
firmware...
-
Add
handdrawn-watchface
topinetime-rust-mynewt/rust/app/Cargo.toml
-
Set
WatchFaceType
inpinetime-rust-mynewt/rust/app/src/lib.rs
/// Declare the Watch Face Type type WatchFaceType = handdrawn_watchface::HandDrawnWatchFace;
The bitmaps occupy 160 KB of ROM. To fit them into PineTime's 512 KB Flash ROM, the large title font needs to be removed from the PineTime firmware build, leaving only the small font. (No changes needed for the WebAssembly Simulator)
To remove the title font from the PineTime firmware build, edit pinetime-rust-mynewt/libs/pinetime_lvgl_mynewt/lv_conf.h
and change...
#define LV_FONT_MONTSERRAT_48 1
...
#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_48
To...
#define LV_FONT_MONTSERRAT_48 0
...
#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_24
The WebAssembly Simulator for this watch face was auto-generated by a GitHub Actions Workflow: simulator.yml
Source code for the WebAssembly Simulator is at the mynewt
branch of github.com/AppKaki/lvgl-wasm
Refer to the article...
"Create Your Own PineTime Watch Face in Rust... And Publish on crates.io"
Dependencies
~19MB
~394K SLoC