Adabox 016 scoreboard

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
lubarb
 
Posts: 8
Joined: Wed Apr 04, 2018 8:54 pm

Adabox 016 scoreboard

Post by lubarb »

I'm trying to set up the scoreboard project. I cleared out the lib directory in CIRCUITPY and copied over the libraries called for on the Code the Scoreboard page using the libraries from adafruit-circuitpython-bundle-6.x-mpy-20210225.zip.

The code errors looking for adafruit_portalbase, and then adafruit_fakerequests.mpy. I added those from the zip file.

Now I'm getting:

Traceback (most recent call last):
File "code.py", line 58, in <module>
File "adafruit_portalbase/__init__.py", line 302, in set_text_color
AttributeError: 'NoneType' object cannot assign attribute 'color'

I'm stumped as to where to look next.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adabox 016 scoreboard

Post by mikeysklar »

lubarb,

Did you upgrade the Circuit Python release as well? These errors sort of sounds like a library mismatched with the CircuitPython release.

Our stable release is 6.1.0 and our 6.2.0-beta.2 can also be used with the latest libraries.

https://circuitpython.org/board/matrixportal_m4/

You can check the boot_out.txt on your CIRCUITPY to see what version of Circuit Python you are running.

User avatar
lubarb
 
Posts: 8
Joined: Wed Apr 04, 2018 8:54 pm

Re: Adabox 016 scoreboard

Post by lubarb »

Yes, I'm on 6.1.0.

I went on the Discord, and kmatch98 pointed me at using a modified portalbase.py to reference adafruit_display_text.bitmap_label instead of adafruit_display_text.label. That seems to have fixed my problem - I've been running the project now for 4+ hours without any problem.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adabox 016 scoreboard

Post by mikeysklar »

Cool. Glad to hear it has been running for a few hours.

Can you post a link to where you obtained the portalbase.py or post the code here in CODE brackets.

User avatar
lubarb
 
Posts: 8
Joined: Wed Apr 04, 2018 8:54 pm

Re: Adabox 016 scoreboard

Post by lubarb »

https://discordapp.com/channels/3272547 ... 5261531157

That's the link that discord gives me, but for some reason it doesn't seem to work for me, so I've included the text of that post here:
Ok, if you're interested in trying, here goes: Download the .py version of the portalbase library here (and put it into your /lib/adafruit_portalbase directory (and delete the .mpy file or rename it to something else for now). Edit this line in /lib/adafruit_portalbase/__init__.py to say

Code: Select all

from adafruit_display_text.bitmap_label import Label
https://github.com/adafruit/Adafruit_Ci ... _init__.py#L27(edited)
GitHub

[1:38 PM]
Be sure that you have the library adafruit_display_text in your /lib folder, and that it contains the bitmap_label library file.
[1:39 PM]
The bitmap_label library has similar functions as the label version, but under the hood it's built slightly different to save some memory. It should be a direct drop-in replacement for label, but I guess you will find out.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adabox 016 scoreboard

Post by mikeysklar »

Cool. Thanks for the link to the __init__.py and modification suggestion. I'm sure this will assist others.

User avatar
lubarb
 
Posts: 8
Joined: Wed Apr 04, 2018 8:54 pm

Re: Adabox 016 scoreboard

Post by lubarb »

Apologies are due. I made these posts in the wrong thread.

I did not get the scoreboard to work.

I was also having trouble with the quote board example, and did get that working as noted here. Unfortunately, these posts don't apply to the scoreboard example.

Perhaps my other replys can be deleted.

To confirm, however, I was on Circuit Python 6.1.0

User avatar
lubarb
 
Posts: 8
Joined: Wed Apr 04, 2018 8:54 pm

Re: Adabox 016 scoreboard

Post by lubarb »

I've revisited this and found that if I comment out lines 58 and 59 to read:

Code: Select all

#matrixportal.set_text_color(RED_COLOR, 0)
#matrixportal.set_text_color(BLUE_COLOR, 1)
the example appears to work correctly.

Locked
Please be positive and constructive with your questions and comments.

Return to “AdaBox! Show us what you made!”