I have two interstate75s and two 4mm 32x32 pimoroni hub75 displays.
They seem to work fine in circuitypython. But in micropython they either display nothing, or sometimes something very corrupted.
I want to control them from another pico and I think this would be easier in micropython ( I have got a pio serial code to work on them, and i2C as a secondary (slave) appears to work better if that doesn’t work, plus I can always use the second cpu to bit bang serial without interfering if I need to).
I downgraded micropython to x.21 and I think it worked for a bit (though it may have been slightly corrupted, but it seems to stop producing output after stopping and starting a few times.
I have been trying the rainbow example amongst other things
import time
import interstate75
i75 = interstate75.Interstate75(display=interstate75.DISPLAY_INTERSTATE75_32X32, stb_invert=False)
graphics = i75.display
width = i75.width
height = i75.height
devs = 1.0 / height
@micropython.native # noqa: F821
def draw(offset):
for x in range(width):
graphics.set_pen(graphics.create_pen_hsv(devs * x + offset, 1.0, 0.5))
for y in range(height):
graphics.pixel(x, y)
i75.update(graphics)
animate = True
stripe_width = 1.0
speed = 5.0
offset = 0.0
phase = 0
while True:
if animate:
phase += speed
start = time.ticks_ms()
offset += 0.05
draw(offset)
print("total took: {} ms".format(time.ticks_ms() - start))
Am I doing something stupid? There are no errors, so I don’t think I have forgotten to install anything.
Whenever I move over to the circuitpython examples they seem to work beautifully.
I have an Interstate 75 W here with two 64x32 setup as 128x32.
Rainbow.py is working OK for me. I’m not sure what version uf2 is on it.
Thonny shows the following MicroPython 294098d on 2023-03-02; Raspberry Pi Pico W with RP2040
It was flashed with Pimoroni’s custom Micro Python uf2 when I set it up.
That worked beautifully last night, I even got it working with a second thread listening to a PIO serial port.
but this morning… It stopped working again,
After more investigation, the panels work fine, if you:
boot into adafruit circuitpython for interstate75
reflash the panel to micropython
then run your micropython code
If you then powercycle, you get nothing.
So circuitpython looks like it is setting some state in the HUB75 panel which is preserved through reflashing the interstate75 but not through power cycling. When I got it working last night I don’t think I power cycled it for hours, so it worked.
The model of panel I have is:
p4-2121-16S-HL1.0 2PS739A
I guess I take this to support@pimoroni?
This is very annoying, because I can get the micropython to do everything I want it to ( read UART and scroll text at the same time), by using the second CPU to keep checking the PIO buffer. If I do the same in circuitpython it gets all corrupted because the CPU is doing HUB75 things some of the time…