Full TMF8828 library: driver, examples, hw_tests, CI#1
Merged
ladyada-piclaw merged 19 commits intoadafruit:mainfrom Apr 7, 2026
Merged
Full TMF8828 library: driver, examples, hw_tests, CI#1ladyada-piclaw merged 19 commits intoadafruit:mainfrom
ladyada-piclaw merged 19 commits intoadafruit:mainfrom
Conversation
Co-authored-by: ladyada <limor@ladyada.net>
Co-authored-by: ladyada <limor@ladyada.net>
Co-authored-by: ladyada <limor@ladyada.net>
INT pin is not used internally - users manage it directly. EN pin is optional (breakouts have pullup). Co-authored-by: ladyada <limor@ladyada.net>
Co-authored-by: ladyada <limor@ladyada.net>
Co-authored-by: ladyada <limor@ladyada.net>
- EN pin defaults to -1 (not needed if hardwired HIGH on breakout) - begin() now accepts i2cSpeed parameter (default 400kHz) - Simple examples use plain Adafruit_TMF8828 tmf; constructor - Only power_modes and set_address examples pass EN_PIN Co-authored-by: ladyada <limor@ladyada.net>
Co-authored-by: ladyada <limor@ladyada.net>
Co-authored-by: ladyada <limor@ladyada.net>
Doxygen 1.8.13 chokes on markdown badge img-in-a tags. Exclude README.md from Doxyfile instead of hacking the markdown. Co-authored-by: ladyada <limor@ladyada.net>
Replace verbose fail/while(1) blocks with halt(F(msg)) calls. Co-authored-by: ladyada <limor@ladyada.net>
Co-authored-by: ladyada <limor@ladyada.net>
Add forceReset() that writes cpu_reset bit in ENABLE register to force the sensor back to ROM bootloader before firmware download. Test 01 now verifies re-init works by calling begin() twice. Co-authored-by: ladyada <limor@ladyada.net>
- Remove waitForResult(), use non-blocking dataReady() poll in loop() - Replace printCell() with snprintf-based printGrid() - Move helper functions after loop() - Add tmf8828_spad_map_t enum for all 14 SPAD map IDs - Add inline comments for configure() args Co-authored-by: ladyada <limor@ladyada.net>
Co-authored-by: ladyada <limor@ladyada.net>
New tmf8828_frame_t struct and readFrame() method collect all 4 subcaptures internally, returning true only when a complete frame is ready. Simplifies 01_simpletest to use readFrame() instead of manual accumulation. Also adds tmf8828_spad_map_t enum. Co-authored-by: ladyada <limor@ladyada.net>
Each subcapture has 36 results but every 9th is a reference channel. Stripping those gives 32 zones (16 per object). 4 subcaptures x 16 = 64 zones = true 8x8 grid. Credit: shabaz123/TMF8828 for the mapping. Co-authored-by: ladyada <limor@ladyada.net>
Subcaptures don't always arrive in order. Map sub N to rows N*2..(N*2+1) instead of using arrival order. Co-authored-by: ladyada <limor@ladyada.net>
Zone mapping from shabaz123/TMF8828 viewer (confirmed against ams EVM). Each subcapture's 16 zones map to specific interleaved 8x8 positions, not sequential rows. Co-authored-by: ladyada <limor@ladyada.net>
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.
Complete Adafruit TMF8828 library implementation.
Features:
Contents:
All hw_tests use halt() helper for clean failure reporting.
EN_PIN and begin() args documented with inline comments.
Co-authored-by: ladyada limor@ladyada.net