A firmware for the watchy smartwatch written in rust.
This firmware targets watchy v3, which is based on the
ESP32S3 chip and the xtensa rust toolchain. It uses
embassy-rs
,
an async executor for embedded rust, to power its tasks
and attempts to use async drivers as much as possible
for better performance and power consumption.
The firmware is #[no_std]
and requires allocations
only for the wifi stack. It uses the esp-hal
crate to provide implementations of the embedded-hal
and embedded-hal-async
traits for the ESP32S3 chip.
Embassy will automatically put the chip into modem sleep when it is idle. As of now, battery life is in the 4 hour range, but that is only because we do not use the deep or light sleep modes.
Energy consumption is roughtly 40Ma, but is expected to be closer to 1Ma average once full sleep works.
The watchy is based on esp32s3 which uses xtensa's llvm
fork. We use mise
to manage all the toolchains and
dependencies so this should be painless.
This will install a rust toolchain, espup
, espflash
,
and then install the xtenza toolchain.
mise install
mise run init
This project is overrides the run
command so after
the dev enviroment is set up a simple cargo run
should be enough.
cargo run --release
- Async wifi connection
- Async ntp time sync
- Async display driver
- Battery status reading
- Accelerometer reading
- Automatic modem sleep
- RTC time syncing
- Buttons and vibration
- Light sleep between updates
- Deep sleep between updates
This is in progress, based on hil-test
.