Can't use both network and graphics on Galactic Unicorn

I’ve got a Galactic Unicorn that I’m programming with Micropython from Thonny. I appear not to be able to use both the wireless network on the picow and the LED display at the same time. This minimal program illustrates the problem:

import network
from galactic import GalacticUnicorn
from picographics import PicoGraphics, DISPLAY_GALACTIC_UNICORN as DISPLAY

wlan = network.WLAN(network.STA_IF)


If either the or gu=GalacticUnicorn() lines are commented, the program completes successfully. If both are present the program seems to get stuck so that I can’t interrupt it from Thonny and have to reset it either by pulling the USB cable or pressing the reset button on the back.

I’ve updated to the latest firmware (MicroPython 856e08b1931b88271816a2f60648f6ff332235b2, galactic_unicorn v1.20.4 on 2023-08-04; Raspberry Pi Pico W with RP2040) but it hasn’t fixed this problem.

Other code which tries to use both the network and the display at the same time (e.g. GitHub - ucl-casa-ce/Galactic-Unicorn-MQTT-Scroller: MQTT Scroller for the Pimoroni Galactic Unicorn (PicoW) ) displays the same problem.

Any thoughts?

Have you tried an earlier version uf2, just in case its an issue with 1.20.4?

I tried the version it came loaded with, which was I think 1.19.18. But I’ll try a few of the official pimoroni uf2s and report back

Seems to be the case with 1.19.18 and 1.19.15 too. (For the avoidance of doubt, using the galactic_unicorn builds from Releases · pimoroni/pimoroni-pico · GitHub )

Hmm, something odd going on there; my GU happily runs with both WiFi and Gfx under 1.20.4; the only thing I can think of (aside from being a hardware issue) is power maybe? Are you running it off a laptop that might be under-powering the port?

I am running off a laptop (2023 MacBook Air, USB-C). (To be precise, the GU is attached to the USB-A port on a dongle which in turn is connected to the Mac.)

Does it work if you create the gu object before the wlan object?

I’m really sorry, but after flipping firmware versions back and forward to try to isolate a problem there, I can’t now reproduce the problem at all, on any firmware version!

(On the other hand this is good as my actual code now works, but it would have been nice to know why things were failing before!)