Skip to content

Offline mode new boards+components. #788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

tyeth
Copy link
Member

@tyeth tyeth commented Aug 12, 2025

  1. This adds the xiao and espressif s3 devkit boards, the sense camera addon (SD), and expansion board (rtc/sd/oled/grove).

  2. Adds the drivers for the omron d6t, plus PCF8563 RTC on xiao grove expansion board (part of RTCLib already)

  3. Adds the INA228, and does the INA 260/237/238 refactor, linked to Ina238 + 237 via a refactor of INA260 too. #765

  4. Updates the build CI step inline with main, for the online job, and the offline job has been similarly updated.

  5. Adds a build define for wokwi, to allow switching the platformio sketch file (src/sketch) between network adapters.

  6. Updates the autoconfig flag to also support globally disabling the auto config. Reason being it can crash repeatedly when attempting to initialise undefined components so the user never sees the error nor has time to remove the config file (except fast repeated shell commands to delete/remove the file).

Hey Brent, the auto config routine tried to initialise something (an unknown i2c rtc) as a vcnl4200 then rebooted. I couldn't disable the auto config globally and it scans then runs for found+unused i2c addresses.
So I've added support for autoConfig: false at the exportedDeviceConfig object level, so it can be specified per component or globally.
The XIAO has an rtc that's nearly the same so I've added that too (PCF8563 instead of -23), including now avoiding scanning that address (0x51) like the other rtc and mux address checks (0x68 + 0x70).

Maybe we could be smarter about the scanning of those addresses and still do so if the user has an already equivalent RTC/Mux component defined (e.g. if already defined soft rtc then they could auto scan 0x68 and 0x51, if defined pcf8523 then that frees up 0x51 for scanning, if a mux at not 0x70 then we can scan 0x70 looking for normal device components safe in the knowledge the only mux is at 0x71 or whatever the user defined)

@tyeth
Copy link
Member Author

tyeth commented Aug 13, 2025

Interesting to note that the wokwi tests don't run on external contributor PRs.

@tyeth tyeth requested a review from brentru August 13, 2025 20:25
@tyeth
Copy link
Member Author

tyeth commented Aug 14, 2025

I'd missed the HDC302x, found in testing. Now all running as expected, SCD40 (0x62), HDC3022 (0x47), INA228 +237 +238 + 260.
Run on Xiao S3, with local platformIO build.

{"i2c_address":"0x44","timestamp":1755184910,"value":3.319726,"si_unit":"V"}
{"i2c_address":"0x44","timestamp":1755184910,"value":3.032684,"si_unit":"mA"}
{"i2c_address":"0x40","timestamp":1755184910,"value":3.31875,"si_unit":"V"}
{"i2c_address":"0x40","timestamp":1755184910,"value":2.13623,"si_unit":"mA"}
{"i2c_address":"0x41","timestamp":1755184910,"value":3.31875,"si_unit":"V"}
{"i2c_address":"0x41","timestamp":1755184910,"value":3.051758,"si_unit":"mA"}
{"i2c_address":"0x45","timestamp":1755184910,"value":3.3175,"si_unit":"V"}
{"i2c_address":"0x45","timestamp":1755184910,"value":2.5,"si_unit":"mA"}
{"i2c_address":"0x62","timestamp":1755184912,"value":32.10574,"si_unit":"C"}
{"i2c_address":"0x62","timestamp":1755184912,"value":89.79034,"si_unit":"F"}
{"i2c_address":"0x62","timestamp":1755184912,"value":43.6408,"si_unit":"%"}
{"i2c_address":"0x62","timestamp":1755184912,"value":625,"si_unit":"ppm"}
{"i2c_address":"0x47","timestamp":1755184915,"value":29.18975,"si_unit":"C"}
{"i2c_address":"0x47","timestamp":1755184915,"value":84.57999,"si_unit":"F"}
{"i2c_address":"0x47","timestamp":1755184915,"value":53.8323,"si_unit":"%"}

config.json

@tyeth tyeth marked this pull request as ready for review August 14, 2025 14:51
Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments, overall a very strong PR!

Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brentru
Copy link
Member

brentru commented Aug 15, 2025

Oh, check that one failing check before merging

@tyeth tyeth merged commit 6ed292d into adafruit:offline-mode Aug 15, 2025
21 of 22 checks passed
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