0

Adabox 016 scoreboard
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adabox 016 scoreboard

by lubarb on Thu Feb 25, 2021 10:28 pm

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.

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

Re: Adabox 016 scoreboard

by mikeysklar on Fri Feb 26, 2021 6:58 pm

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.

mikeysklar
 
Posts: 3948
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adabox 016 scoreboard

by lubarb on Fri Feb 26, 2021 7:44 pm

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.

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

Re: Adabox 016 scoreboard

by mikeysklar on Sun Feb 28, 2021 2:04 pm

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.

mikeysklar
 
Posts: 3948
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adabox 016 scoreboard

by lubarb on Mon Mar 01, 2021 11:24 am

https://discordapp.com/channels/327254708534116352/537365702651150357/814929065261531157

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 | TOGGLE FULL SIZE
from adafruit_display_text.bitmap_label import Label


https://github.com/adafruit/Adafruit_CircuitPython_PortalBase/blob/4e8bb185646c663292b3e16afdd6a9a15492d197/adafruit_portalbase/__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.

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

Re: Adabox 016 scoreboard

by mikeysklar on Mon Mar 01, 2021 5:25 pm

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

mikeysklar
 
Posts: 3948
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adabox 016 scoreboard

by lubarb on Tue Mar 02, 2021 9:36 pm

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

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

Re: Adabox 016 scoreboard

by lubarb on Wed Mar 03, 2021 3:58 pm

I've revisited this and found that if I comment out lines 58 and 59 to read:
Code: Select all | TOGGLE FULL SIZE
#matrixportal.set_text_color(RED_COLOR, 0)
#matrixportal.set_text_color(BLUE_COLOR, 1)
the example appears to work correctly.

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

Please be positive and constructive with your questions and comments.