Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BC03 Embedded Swift

A faithful digital replica of the Braun BC03 analog clock, running on a Waveshare RP2350-Touch-LCD-2.8C round display in Embedded Swift.

BC03 clock face showing 10:10

Hardware

Component Detail
Board Waveshare RP2350-Touch-LCD-2.8C
MCU RP2350B — dual ARM Cortex-M33 @ 240MHz
Display 2.8" round IPS, 480×480, RGB parallel interface
Flash 16MB
RTC PCF85063 over I2C

How it works

All three hands and all 12 numerals are pre-rendered on macOS using CoreGraphics and stored as sparse pixel arrays in flash. On the device, drawing a hand is a tight C loop writing ~1800 pixels — no runtime rendering math. This gives pixel-perfect CoreGraphics fidelity at embedded speeds.

The second hand has 600 pre-rendered positions (one per 1/10 second), combined with time_us_32() sub-second timing for smooth continuous sweep. Updates are synchronized to the display's DMA scanout to eliminate tearing.

See CLAUDE.md for the full architecture walkthrough.

Building

Prerequisites

brew install ninja arm-none-eabi-gcc
brew install --cask gcc-arm-embedded
brew install swiftly
swiftly install latest
git clone https://github.com/raspberrypi/pico-sdk pico-sdk --recurse-submodules

Generate sprites (one-time, ~10 min)

swift run SpriteGen

Build firmware

cd firmware && mkdir -p build && cd build
PICO_SDK_PATH=/path/to/pico-sdk \
  cmake .. -G Ninja \
  -DPICO_TOOLCHAIN_PATH=/Applications/ArmGNUToolchain/15.2.rel1/arm-none-eabi/bin \
  -DCMAKE_Swift_COMPILER=~/.swiftly/bin/swiftc
PICO_SDK_PATH=/path/to/pico-sdk ninja

Flash

Hold BOOTSEL while plugging in USB, then copy the UF2:

cp firmware/build/braun-clock.uf2 /Volumes/RP2350/

Set the time

swift run SetTime

macOS simulator

Renders the clock face to PNG without any hardware:

swift run MacSimulator   # outputs to ~/Desktop/clock-test/

About

Braun BC03 analog clock replica in Embedded Swift on Waveshare RP2350

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages