Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Working Code - then Too Many Display Busses
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Working Code - then Too Many Display Busses

by gallaugher on Fri Oct 16, 2020 1:39 pm

Hi!
With the upgrade of Circuit Python to 6.0 b2 I can finally get my Adafruit 32 x 32 LED working with the LED Matrix Portal.
I've gotten Liz/BlitzCityDIY's fun PartyParrot code working on my display w/the Matrix Portal, but a strange thing happens.

I assume code.py works because it's running & parrot is displaying.
But when I open code.py in Mu and save again without any modifications, this error shows up in the serial monitor:

Traceback (most recent call last):
File "code.py", line 44, in <module>
RuntimeError: Too many display busses

Again, I can close out of the code.py that's up in Mu, make sure I'm loading code.py from the CIRCUITPY that is my Matrix Portal. There's no main.py or other file that would take priority over code.py. But when I save back to the Matrix Portal, open the serial monitor, run, I get the error above.

I wanted to start modifying Liz's code to see if I can put my own animated BMPs in, but want to try to figure out what's happening here, first, to make sure there's not some weirdness in the code that I need to fix. Here's a gist for the code.py file:
https://gist.github.com/gallaugher/05fb ... 4a858c941b

Thanks!
John

gallaugher
 
Posts: 176
Joined: Tue Aug 14, 2018 12:42 pm

Re: Working Code - then Too Many Display Busses

by tannewt on Fri Oct 16, 2020 2:24 pm

Hi John, displays are a bit weird because they last longer than the VM so that we can show errors on them. In code.py, you then should release the active displays before recreating them using `displayio.release_displays()`.

tannewt
 
Posts: 1837
Joined: Thu Oct 06, 2016 8:48 pm

Re: Working Code - then Too Many Display Busses

by gallaugher on Sat Oct 17, 2020 10:46 am

Thanks so much, Scott. Totally solved my problem. Really appreciate your kind reply.

gallaugher
 
Posts: 176
Joined: Tue Aug 14, 2018 12:42 pm

Please be positive and constructive with your questions and comments.