Skip to content

Conversation

ritesh006
Copy link
Contributor

What

Move displayio.release_displays() above SPI initialization in the README example and add a brief comment explaining why.

Why

Initializing SPI before displayio.release_displays() can leave pins “in use” on subsequent reloads of code.py, especially when users switch to explicit busio.SPI(...) pins. This change prevents those errors. Fixes #39.

Changes

  • README.rst: call displayio.release_displays() before spi = board.SPI()
  • Add comment:

    If you use explicit pins with busio.SPI(...), calling release_displays() first

    prevents "pin in use" errors on subsequent reloads.

Scope

Docs-only; no runtime code changes.

How to Verify

  1. Flash the README example to a board with an ILI9341.
  2. Save once → display initializes.
  3. Modify and re-save (or reset) → no “pin in use” errors on reload.

…mple

Fixes adafruit#39.

Also note why: avoids 'pin in use' errors on subsequent reloads when using explicit SPI pins.
@ritesh006
Copy link
Contributor Author

Docs tweak for #39: move displayio.release_displays() above SPI init to avoid pin conflicts on reload.
Ready for review—thanks in advance!

Copy link
Contributor

@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.

Thank you!

@FoamyGuy FoamyGuy merged commit 503a5dd into adafruit:main Aug 27, 2025
1 check 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.

Readme.rst example usage section error
2 participants