Pico Micropython Image

So I’ve been working away on a basic BME680 and icons module, which are very roughly working at the moment

The issue I’m having right now is the background. Background files are far too big for the RAM on the Pico so it fails to allocate space, but rendering nice colour gradients can take a handful of seconds. It’ll probably be faster if it is written in C but for the moment my C isn’t great, so I might have to come back to this later.

@Shoe nice, I’ll be doing something like that at some point. My C skills are a big fat 0, so I won’t be going down that road if I can help it. Not with any code I dreamed up, lol.

I have some basic C experience from working with Arduino boards, but compiling stuff for the Pico uses CMake and I need to read into that. I tried to play with it and it just seemed hard coded to compile only the programs it already knew about.

There must be some way to handle the backgrounds as a lot of Adafruit feather products have screens with higher resolutions running on chips with less memory, but I’d have to hoke around and see how they do it.

Yeah, Adafruit are really Micro Controller orientated. That’s there bread and butter so to speak. The Raspberry Pi is kind of a side product. That’s the impression I get anyway.
Here its the other way around. Pi First , Micro controllers second.
Just my humble opinion. :)

I’m really curious why the Pi Foundatin made the 2040. From what I hear custom silicon is no small task and needs very specific skills, so I can only assume they invested the time and money into it because they have big custom-silicon plans for the future and that the 2040 was really a test of whether or not they could realistically do it. It makes me wonder about future plans for the SBC Pi boards.

I do believe the Pi Foundation / Raspberry Pi have an anniversary coming up?
Might be some cool stuff released then.

The 29th of February, so Monday this year I’d guess. I’d be really surprised to see more custom silicon, but you never know.

The picture on the Explorer page has the wrong font to have been done with their MP UF2.
Graduated backgrounds are quick and easy. I put graduated colours on a bar graph.
Blue ->Green → Red

pot = 50
running = True
while running:    
    if display.is_pressed(0): # A pressed
        pot = pot + 1
        if pot > 100: pot = 100
    if display.is_pressed(1): # B pressed
        pot = pot - 1
        if pot < 0 : pot = 0    
    utime.sleep(0.02)
    
    display.update()
    display.set_pen(pot,pot,pot) # grey to white
    display.circle(120,140,50)
    # Calculate rainbow colour
    if pot < 50: # Blue -> Cyan -> Green
        r = 0
        g = int(pot * 2)
        b = int(100 - pot * 2)   
    else:       # Green -. Yellow -> Red
        r = int((pot-50)*2)
        g = int(100 - ((pot-50)*2))
        b = 0
    display.set_led(r,g,b)
    percent = pot
    showgraph(percent,r,g,b)
    if display.is_pressed(3): # Y button is pressed ?
        running = False

Does this help?

@Shoe I didn’t realize it was that close? There was a thread on the Anniversary date on the PI Forum but I couldn’t find it when I posted. I guess it depends on how long they have been working on this in the background. They never ever give any info on new products on the forum. It happens when it happens etc. Lots of locked threads when anybody asks or try’s to guess what’s coming. Especially I’d like this threads.
My chronic back pain has flared up so I’m just in the watch what’s happening mode. I won’t be doing much soldering or tinkering for a while. Really having a hard time concentrating too so I may lay low on the forum for a while.

I’m suffering too. Old age and hunched over a keyboard for too long in my case. Changed the chair and try to lean back more is helping.
Hope you feel better soon.

Oh for another Raspberry Jam in Cambridge - they were great and the beer, from the guy who wrote the GPIO code. - Memories!

@Tonygo2 That’s a neat script! Generating the gradient is fine though, I was trying to generate a gradient across the whole Explorer screen but the combination of setting so many pixels to different colours and the relative slowness of Python means it’s hard to refresh the screen at a reasonable speed.

I’ve not been to the Cambridge Pi Jams but they sound like they really know what they’re doing. I went to Raspberry Fields and had a blast, I was really disappointed they didn’t run another one in 2019.

I hope you feel better soon @alphanumeric.

Shoveling snow did it this time. Its what made it worse anyway. I just put my Obus back rest in my chair and took a mussel relaxer. Felling better already.

I’ve used loads of Adafruit stuff - bought from Pimoroni. ItsyBitsy in various sizes and BLE, Circuit Playground, CLUE, PyPortal, and Edge Badge. The last has plenty of IO sockets. PICO supports 2 cores and interrupts which the CircuitPython cannot do fully at the moment but LOWER CASE letters are easy.