Skip to content

update sd examples for 10.x behavior #3062

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
merged 3 commits into from
Jun 13, 2025
Merged

Conversation

FoamyGuy
Copy link
Collaborator

Adds try/except for initializing the SD to account for new 10.x feature that the core will auto initialize it.

I tested the updated examples with both 9.2.8 and 10.0.0-alpha.6 on Metro RP2350

@FoamyGuy
Copy link
Collaborator Author

This is trying to resolve the same root issue as #3061, I didn't see that one was submitted until after I submitted this.

I think it would be best to use this try/except syntax so that we can have 1 code file that supports both 9.x and 10.x, rather than having two separate files with comments mentioning which file supports which versions. I think it will make it easier to document in the learn guide as well because we can have a single code embed that will work for both versions.

I can close this if we want to keep the different versions separated by different files instead though.

Copy link
Collaborator

@TheKitty TheKitty left a comment

Choose a reason for hiding this comment

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

I think the code could use some more comments for clarity

@FoamyGuy
Copy link
Collaborator Author

The latest commits add more comments explaining the steps of the SD card init section of code and mention the 9.x / 10.x difference with auto mounting.

I also noticed one of these files mistakenly still contained a section of comment that was from the template this was created from and removed that.

@FoamyGuy FoamyGuy merged commit f393f27 into adafruit:main Jun 13, 2025
4 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