Skip to content

Generalizations on Metro_RP2350_Chips_Challenge for Fruit Jam #3094

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
Aug 5, 2025

Conversation

RetiredWizard
Copy link
Contributor

This pull request addresses the issues identified in adafruit/Fruit-Jam-OS#32.

  1. The "Fonts" and "Sounds" files were accessed using an absolute path from the root directory, this PR modifies that so the files are accessed from a relative path from the directory the code.py file is executed from. This should not have any impact on running the standalone code file as described in the learn guide but will also allow the code to be run from a sub folder as is done in Fruit Jam OS.

  2. The original code used specific pins wired to the TLV320DAC3100 I2S audio breakout. This PR first attempts to initialize the DAC using typical pin names for boards that have built in I2S boards and only if that fails, falls back to the original pins defined in the learn guide.

  3. The original code attempted to mount an SD card to save "save states" on. The core will now auto mount SD cards for boards with installed SD slots. This was causing the original code to crash when it attempted to mount the SD card that was already mounted. This PR changes the games mount function to first attempt to perform a storage.remount and if successful simply return indicating the mount was successful. If the remount isn't successful the original function to attempt and SD card mount is performed.

@TheKitty TheKitty requested a review from makermelissa August 2, 2025 01:51
@RetiredWizard
Copy link
Contributor Author

@jedgarpark probably needs to review the changes to the Larsio Paint Music files. Let me know if I should drop those changes from here and submit them as a separate PR. Both sets of changes are to support running in Fruit Jam OS but they are for different guides. Thanks!

Copy link
Collaborator

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

The pylint errors are for except: with no specific type of exception declared. We need either change those parts to use different logic, or else find the more specific type of error that the system will raise under those conditions and have the except block catch that more specific type.

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

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

Yeah, that should work fine for Chip's Challenge since the classes are all in the same folder.

@TheKitty
Copy link
Collaborator

TheKitty commented Aug 2, 2025

I think return None makes sense, meaning there is no card. Then error catching statements in user code aren't needed then simplifying things just checking if a value is None. My 2 cents

@RetiredWizard
Copy link
Contributor Author

I think return None makes sense, meaning there is no card. Then error catching statements in user code aren't needed then simplifying things just checking if a value is None. My 2 cents

I would agree, implementing that will require a core change though and I think it would be nice to have Chips Challenge working on the Fruit Jam while a core solution is being implemented.

@TheKitty
Copy link
Collaborator

TheKitty commented Aug 2, 2025

Agreed

Copy link
Collaborator

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

I tested larsio paint both as a Fruit Jam OS app, and in the root of CIRCUITPY and confirmed both are working as expected.

I think this is good to go.

@FoamyGuy
Copy link
Collaborator

FoamyGuy commented Aug 5, 2025

I also double checked in both guides for any non-embedded code that would need to be updated to reflect these changes.

@FoamyGuy FoamyGuy merged commit 5e539a6 into adafruit:main Aug 5, 2025
4 checks passed
@RetiredWizard RetiredWizard deleted the chipsfixes branch August 8, 2025 02:27
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.

5 participants