Problem with "PyPortal WFH Busy Sounds Simulator"

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Problem with "PyPortal WFH Busy Sounds Simulator"

Post by MattPackwood »

I am having a error trying to run this on a PyPortal Titano

The code is from:
https://learn.adafruit.com/pyportal-wfh ... lk-through

Code: Select all

code.py output:
Traceback (most recent call last):
  File "code.py", line 108, in <module>
  File "adafruit_displayio_layout/widgets/icon_widget.py", line 55, in __init__
TypeError: unexpected keyword argument 'label_background'

User avatar
Foamyguy
 
Posts: 65
Joined: Mon May 26, 2014 4:24 pm

Re: Problem with "PyPortal WFH Busy Sounds Simulator"

Post by Foamyguy »

Hello, I am the guide author, thank you for reporting this issue.


The WFH Busy Simulator uses some new features for the IconWidget. Those new features were added to the library, but we hadn't made an official release with them yet. That means that the "Download Project Bundle" links where you likely downloaded the code and libraries from would have gotten an older version without the required new features.

I have just made the release for that library now so after a day or two the "download bundle" buttons will automatically start containing the newest version needed with those features.

In the meantime you can download the library file from the Github Release page here: https://github.com/adafruit/Adafruit_Ci ... tag/1.17.0

Downlad the asset named "adafruit-circuitpython-displayio-layout-7.x-mpy-1.17.0.zip"

and then unzip it and copy adafruit_displayio_layout from inside of there into the lib folder on your device.

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Problem with "PyPortal WFH Busy Sounds Simulator"

Post by MattPackwood »

OK, that is working! Now I just need to figure how to make the images "fill the bigger Titano screen"

User avatar
Foamyguy
 
Posts: 65
Joined: Mon May 26, 2014 4:24 pm

Re: Problem with "PyPortal WFH Busy Sounds Simulator"

Post by Foamyguy »

You could try changing the width and height of the GridLayout here:
https://github.com/adafruit/Adafruit_Le ... py#L98-L99

The Titano Screen is 480x320 so you could fill in those values. That should spread the icons apart farther so that the full table occupies the screen space better. But the icons will remain the same size. Editing the BMP assets included in the project to be larger size would be the easiest way to make each icon actually be bigger on the display.

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Problem with "PyPortal WFH Busy Sounds Simulator"

Post by MattPackwood »

I did that, not quite what I expected...
Attachments
IMG_4505.jpg
IMG_4505.jpg (908.08 KiB) Viewed 111 times

User avatar
Foamyguy
 
Posts: 65
Joined: Mon May 26, 2014 4:24 pm

Re: Problem with "PyPortal WFH Busy Sounds Simulator"

Post by Foamyguy »

Ah, I forgot about the background image as well. That will need to be scaled upwards in a photo editor for the best results (or choosing a new larger background image, you can substitute in a different one if you like).

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Problem with "PyPortal WFH Busy Sounds Simulator"

Post by MattPackwood »

I tried resizing it with Preview on my iMac, no joy, when I edit it and load it to my Titano it just "becomes black".

User avatar
Foamyguy
 
Posts: 65
Joined: Mon May 26, 2014 4:24 pm

Re: Problem with "PyPortal WFH Busy Sounds Simulator"

Post by Foamyguy »

I don't have any experience with mac applications. But My guess is that possibly the thing you've edited it with is changing the color format to RGB instead of indexed color. That would have the symptoms you describe I think (image showing only black on the display.)

There is a page in this guide that covers the indexed bmp color format and how to use a free tool to make your images compatible with CircuitPython displayio: https://learn.adafruit.com/creating-you ... p-graphics

Try converting the image as shown on that page and then loading the resulting file to your CIRCUITPY drive.

User avatar
MattPackwood
 
Posts: 95
Joined: Wed Jul 23, 2014 9:13 pm

Re: Problem with "PyPortal WFH Busy Sounds Simulator"

Post by MattPackwood »

Yep, that worked!!!!

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

Return to “Adafruit CircuitPython”