Skip to content

Add I2C HIL testing matrix and mux layout tooling#5

Open
tyeth wants to merge 48 commits intomainfrom
i2c-testing-matrix
Open

Add I2C HIL testing matrix and mux layout tooling#5
tyeth wants to merge 48 commits intomainfrom
i2c-testing-matrix

Conversation

@tyeth
Copy link
Copy Markdown
Owner

@tyeth tyeth commented Apr 15, 2026

Summary

  • MAX44009 component: adds definition, image, vendor name fix, published status
  • HIL I2C testing spreadsheet generator (generate_hil_spreadsheet.py): reads all components/i2c/*/definition.json files and produces a 3-sheet Excel workbook:
    • Sheet 1 — Component Matrix: all 92 I2C components with addresses, conflicts, address heatmap, jumper/solder pad info, and Learn Guide URLs
    • Sheet 2 — HIL Mux Layout: conflict-free channel assignments across direct bus + 8ch TCA9548A (0x77) + 4ch TCA9544A (0x71), with per-component assigned address, non-default highlighting (orange), and jumper configuration instructions
    • Sheet 3 — Address Conflicts: per-address overlap summary
  • Jumper info cache (i2c_address_jumper_info.json): address jumper/solder pad details for all 92 components, sourced from Adafruit Learn Guides
  • Auto-fetch for new components: when a new component is added without jumper info, the script warns, counts down 5s, then calls claude -p to research and cache the info automatically. Cross-platform (Windows/WSL/Linux/macOS).
  • Respects definition-order I2C addresses (Adafruit default first)
  • Generated hil_i2c_components.xlsx included for immediate use

Hardware config

  • 8ch TCA9548A mux @ 0x77 (all 3 addr pads bridged)
  • 4ch TCA9544A mux @ 0x71 (A0 bridged — optimal to avoid blocking SHTC3 at 0x70)
  • Reserved addresses: {0x71, 0x77}

Key stats

  • 92/92 components placed, 0 conflicts
  • 15 on direct bus (unique addresses), 77 across 8 mux channels
  • 27 components assigned non-default addresses (highlighted orange with jumper instructions)
  • 4ch mux channels all spare (room for future components)

Test plan

  • Run python generate_hil_spreadsheet.py — verify 92 placed, 0 conflicts, spreadsheet generated
  • Open hil_i2c_components.xlsx — check all 3 sheets render correctly
  • Verify non-default address cells are highlighted orange with jumper instructions
  • Add a dummy component dir, re-run script — verify missing-jumper warning and claude -p auto-fetch triggers
  • Test on Linux/macOS to confirm cross-platform claude CLI detection

🤖 Generated with Claude Code

tyeth and others added 30 commits February 20, 2026 15:33
add(component): Sciosense ENS161 MOX gas sensor
add(i2c): Sensirion SGP41 (NOX/VOC index+raw)
fix(sgp41): use close up image instead of shop default
…ocumentation

Rewrite README: document all 9 component types, replace TODO placeholders, update sensor types
Companion to adafruit/Adafruit_Wippersnapper_Arduino#892.
AS7331 is a triple-channel UV sensor (UVA/UVB/UVC) by ams-OSRAM,
exposing UVB as a raw subcomponent. I2C addresses 0x74-0x77.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use the actual Adafruit learn guide instead of the GitHub library repo.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add guards in three places:
- Arguments section: treat PR-provided definitions as hints, not verified data
- Step 0 callout: must independently verify every field even when a PR supplies a definition
- documentationURL guidance: explicitly forbid GitHub library repo URLs for Adafruit products

Motivated by a bad PR where documentationURL was copied from a firmware PR
as a GitHub repo link instead of the actual learn guide.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Points 3 and 4 in the image selection guidance contradicted each
other — point 3 said "straight-on" and "avoid angled shots" while
point 4 said "slight angle". The correct style is the standard
Adafruit isometric product photo (typically CDN image 00).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The CDN image numbering isn't fixed at 04 — increment from 00
until a 404 instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Image numbers on Adafruit CDN aren't contiguous — scrape all
available image URLs from the product page gallery instead of
iterating through a hardcoded range.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add APDS9999 component definition
tyeth and others added 18 commits April 3, 2026 17:46
Update SPA06-003 definition to publish the component
Add AS7331 UV spectral sensor component definition
Set AS7331 published status to true
Added a description field for the AS7331 sensor.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All 92 components covered. Here's what's now in the spreadsheet and script:

  What was added

  i2c_address_jumper_info.json — cached jumper info for all 92 components:
  - default_address, has_address_jumper, address_jumper_info, per-address descriptions, Learn Guide URLs
  - 89 high confidence, 3 low (MLX90632 variants — no Adafruit Learn Guide)

  Sheet 1 (Component Matrix) — 3 new columns:
  - Has Jumper — Yes/No/?
  - Jumper Info — full description of how to change address
  - Guide URL — link to Learn Guide pinout page

  Sheet 2 (HIL Mux Layout) — channel blocks and linear list both have:
  - Jumper Config column — highlighted orange when non-default, shows the specific instructions needed
  - Has Jumper, Guide URL columns in the linear list

  Auto-fetch for new components — when the script runs and finds a component missing from the JSON:
  1. Prints a warning listing missing components
  2. 5-second countdown (Ctrl+C to skip)
  3. Calls claude -p with a prompt to research the jumper info
  4. Parses the JSON response and updates i2c_address_jumper_info.json
  5. Reloads and continues with the spreadsheet generation
…tion

- Replace verbose jumper info with short pad notation in channel blocks
  (e.g. "A0:1 A1:1", "SDO:GND", "ADDR:closed", "ADR:VDD")
- Linear list now has both "Jumper Setting" (short) and "Jumper Details" (full)
- Cross-platform claude CLI finder: handles .cmd/.exe/.ps1 on Windows,
  checks npm global paths, shell=True for .cmd shims
- Fix edge cases: ADR pin (sht3x), fixed-addr sensors, range-key lookups
- Reorder channel block columns: Jumper Setting next to Assigned Addr

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Groups all 92 components by what they physically measure (temperature,
humidity, pressure, light, gas/VOC, proximity, current/voltage, PM,
IR temp, percent) with suggested test fixtures per phenomenon. Includes
multi-phenomenon sensor summary and per-group detail blocks with channel
assignments and jumper settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants