FancyClock: add optional Glass2 Grove OLED support#50
Open
Swissola wants to merge 3 commits into
Open
Conversation
If an SSD1309 OLED is connected via Grove (GPIO1/GPIO2), it shows complementary info to the main bouncing clock display: View 0 (datetime): 24hr HH:MM:SS, day name, full date View 1 (battery): percentage, estimated voltage (~3.15–4.2V) Any keypress while the backlight is already on cycles between views. First press from idle wakes the backlight without cycling (expected behaviour — user confirms what they see before changing it). Glass2 is fully optional; app behaves identically without it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Calling _g2_show once per loop iteration rather than only on the 100-frame tick — otherwise displayed seconds would be frozen for ~6s at a time. Battery view still only recalculates pct on the slow tick. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update OLED once per second (on second change) rather than every 60ms frame — reduces I2C traffic ~60x and OLED power draw - Power off OLED when backlight dims to idle (burn-in prevention) - Power on and force immediate redraw when any key wakes the display Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Behaviour
Hardware
ssd1306is available in MicroPython firmware🤖 Generated with Claude Code