Repository navigation
cyberpunkunicorn-os 0.1.2: bounded hat probe, reliable tag reads, success flash, whole-frame mirror - #15
Merged
Conversation
…lash, whole-frame mirror, 0.1.2
- Hat probe: a stuck I2C bus (usually a wedged PN532) ran every address into
Wire's 50 ms timeout, six scans at boot, so the command task started after
the website stopped waiting ('printing but not answering'). Now: lines held
low skip the scan, 10 ms per address, 250 ms per scan, stop at the first
timeout, no SPI after. hat.probe and system.status report i2c_stuck.
- Tags: Bruce's read() and write_ndef() re-select the card and read the
answer without waiting for RDY, so a tag held still could miss every retry.
Read and write on from our own select, which waits. Poll wait 40 -> 150 ms
so a poll never talks over the PN532's no-card answer.
- No speaker on this board: a successful write or scan flashes the onboard
RGB LED through the rainbow (own task, the reply doesn't wait).
- Patch 0018: the screen stream sends every draw, waiting for queue room,
instead of dropping a busy screen and de-duplicating erases.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Aw32AU4vVqCSEoNA5aP3U
hellofrequencylab
marked this pull request as ready for review
October 21, 2026 01:56
…019) PN532's format_data(), set_uid(), read_data_blocks() and write_ndef_blocks() are private, and card.cpp's '#define private public' only opens Adafruit_PN532, so the CI build refused them. Patch 0019 adds two public PN532 methods that wrap them; card.cpp calls those. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Aw32AU4vVqCSEoNA5aP3U
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.
Fixes four things Daniel hit on the board on 2026-10-21. One project:
cyberpunkunicorn-os/."Printing but not answering commands." The startup hat probe runs before Bruce starts its serial command task. When the I2C bus was stuck (usually a wedged PN532 on DIP 3), every one of the 112 addresses hit Wire's 50 ms timeout, and the probe scanned six times. That pushed the command task past the website's 40 s wait. Changes:
hat.probeandsystem.statusreporti2c_stuck.A sticker held on the reader is never seen. Bruce's
PN532::read()andwrite_ndef()select the card again and read the answer without waiting for RDY, because nothing waits over I2C. So every retry could fail. We now read and write on from our ownselectCard(), which waits. The poll wait goes from 40 to 150 ms, so a poll never talks over the PN532's "no card" answer.No speaker. A successful write or member scan now flashes the onboard RGB LED through the rainbow. It runs on its own task, so the reply doesn't wait.
The live screen shows fragments. New patch 0018 changes Bruce's tft logger. With
display starton, it dropped draws when the 40–64 entry queue was full, and it never sent a draw already in its log, such as an erase in the same colour. Now every draw is queued, waiting up to 50 ms for room.OS_VERSION is 0.1.2. I could not build locally because the container's proxy breaks PlatformIO's toolchain download, so CI is the build check. Nothing has been tested on hardware yet.
The website side is hellofrequencylab/frequency-web on branch
claude/project-thread-lhkr1c.Generated by Claude Code