Set a Sensor Watch Pro from an ordinary Android phone screen. The phone flashes a visible black-and-white patch; the watch receives it through its onboard phototransistor and sets its complete UTC date and time, including subsecond phase. No Bluetooth, camera, IR accessory, or case modification is required.
This repository publishes Light Sync as an optional Second Movement face. It does not replace the rest of your watch UI: add the face to the firmware you already use, compile once, and use the Android app for future time syncs.
Ambient-light sync works on real hardware.
- An assembled Sensor Watch Pro in a Casio A158 with the original LCD synced successfully from a Pixel 10a screen.
- A controlled reduced-contrast campaign completed 30/30 independent sync sessions and accepted 61/61 completed frames, with no completed-frame CRC rejection.
- The predeclared gate required the one-sided 95% Wilson lower confidence bound for frame acceptance to exceed 95%. The 61/61 result gives 95.75%, so it clears that gate.
- The assembled-watch check landed visually within roughly 25 ms of time.gov.
The 95.75% figure is deliberately narrow: it describes completed-frame acceptance in that controlled Sensor Watch Pro / Pixel 10a experiment. It is not a claim that every phone, brightness, alignment, or environment has already been qualified. Please report results from other phones and watch assemblies.
| Path | Purpose |
|---|---|
watch-face/ |
Production Movement face and alarm-safe buzzer support |
lightsync/ |
Shared C protocol, decoder, time-source arithmetic, and host tests |
android/ |
Production Android transmitter source |
patches/second-movement.patch |
Patch against Second Movement 4a580eeb |
PROTOCOL.md |
Compact wire-protocol and receiver description |
QUALIFICATION.md |
Scope and calculation behind the 95% acceptance gate |
There is intentionally no ADB lab Activity, USB console, DOE controller, raw trace archive, or custom stock-A158 firmware in this repository.
The integration patch targets the current Second Movement main commit
4a580eeb55a6a39b1eff4ec393e196a571520032.
git clone https://github.com/illusion-pasture-program/sensor-watch-lightsync.git
cd sensor-watch-lightsync
git clone --recursive https://github.com/joeycastillo/second-movement.git
git -C second-movement checkout 4a580eeb55a6a39b1eff4ec393e196a571520032
git -C second-movement apply ../patches/second-movement.patch
cd second-movement
make BOARD=sensorwatch_pro DISPLAY=classicUse DISPLAY=custom only for the Oddly Specific replacement LCD. For the LCD
supplied with a Casio watch, use DISPLAY=classic.
The patch adds light_sync_face to movement_config.h. Adjust its position in
that list as you would any other face. The feature is compiled only for boards
with HAS_IR_SENSOR, which currently means Sensor Watch Pro.
Flash second-movement/build/firmware.uf2 using the watch's normal WATCHBOOT
drive. A face is source code, not a dynamically installable watch plugin, so the
one full-firmware flash is unavoidable.
Requirements: JDK 17+, Android SDK platform 35, NDK 27.2.12479018, and CMake
3.22.1.
cd android
./gradlew testDebugUnitTest assembleDebugInstall android/app/build/outputs/apk/debug/app-debug.apk, or open android/
in Android Studio. The app requests only network access, obtains a fresh SNTP
time estimate, holds the screen awake, and drives the display using the shared
C protocol implementation.
- Open the Android app and wait for a network-backed time source.
- Navigate to the
SYNC / PRESSface on the watch. - Press the watch's alarm button to arm the receiver.
- Start Watch Sync in the app and center the sensor area over the flashing patch. Keep the watch still.
- Three short ascending beeps mean success. Two long descending beeps mean the attempt failed; reposition and retry.
The receiver requires two adjacent CRC-valid frames before touching the RTC. A frame lasts exactly seven seconds; normal acquisition is therefore longer than seven seconds and the watch allows up to 60 seconds.
python lightsync/build.py --clean gccThe seven portable suites cover the protocol vector, decoder impairments, RTC-phase arithmetic, transmitter scheduling, SNTP validation, adjacent-frame confirmation, session lifecycle, and structured interference.
MIT. See LICENSE and NOTICE.md.