My Enviro (code) based Weather Station Build

Go mad and learn to use LoRa to send the data at a greater distance. (popped here from over Pi Forums )

If you stay with WiFi (you have the wi-fi range) then scrap the Pico. The addon for WiFi is usually an ESP device, so you can scrap the Pico and just use the ESP device itself. i.e. the pico is redundant increases power usage and you gain no advantage.

Pretty much all my devices are setup like this ‘IoT style’ and I send it to a Pi server to do the hard work being a server.

Nice to see you here. Lots of time to research this and form a plan. I won’t be buying the above for a while yet, maybe Christmas?

EDIT: Hmm, I have an Arduino MKR1000 sitting here doing nothing?

That is developing nicely. I will be following your progress with interest.
I’ve gone for a Pico Environmental Sensor board from Waveshare:

  • BME280 = Temperature, Humidity and Pressure
  • TSL25911FN = light sensor - Lux
  • LTR390-UV-1 = Ultra Violet
  • SGP40 = Air quality
  • ICM20948 = Motion 9-DoF - accelerometer, gyroscope and magnetometer
  • I2C and all on the same 2 wires!

I’ve got them all reporting readings and am now working on the graphics in Micropython. 1352 lines of code, including drivers - no libraries, and still growing!

My coding skills are average at best. Thus I usually borrow on what I can find that already works, and has most of the grunt work already done. Then modify to my needs. I’m pretty good at figuring out what a block of code does, just not how it does it. ;)

I have some PICO’s here, and the PICO Breakout Garden. At some point I’ll likely try to do something similar on it. Over the winter maybe?

Thanks for the comments, I do value your input. =)

EDIT: And a big thanks to @bensimmo, for all his help over on the Pi Foundation Forum.
Double Trouble, need some help with a Python file. - Raspberry Pi Forums

1 Like

I went headless for now, easy peasy even with my modified pHat Stack. I just plug my custom Pi Zero into the ribbon cable header. It has a female 90 header on the back side. It plugs in with all the plugs pointing up for easy access.
I also added a Backlight On Off switch to turn off both backlights. I can leave it running but turn the displays off at night. I also added a shut down and boot buttons. Needed if you run headless.

If you look close you can see the female header that plugs into the Pi 400 on the left just below the two LCD’s.

That is a pretty smart I like it. Nice tidy build too. Look forward to future updates. 👍

1 Like

Thanks, I enjoy this stuff immensely when a project starts to come together. And Pimoroni make it so much easier. That was a pretty easy mod, dremel and a 90 female header. Not knowing where the tracks were inside the board, there was some risk. There isn’t anything past that last header so I took the risk. Then did a continuity check from that last header to the next one. All good. =) Warmed up the soldering iron, etc.

I’ve been putting Pi Zero’s on pHat stacks and Mini Hackers for a while now. If you put the 90 female header on the Pi Zero, the pHat Stack stays stock and you can still use the ribbon cable to hook up a 3B or 4B. Or a Pi 400, but its a bit of a pain on a Pi 400. That’s what led me to do the above. Now that pHat stack is dual purpose. You just have to remember to remove the Pi Zero before plugging it into a Pi 400.

My Pi 400 is something new to tinker with. The placement of its GPIO Header makes you get creative.

What is on the Breakout Garden Hat will eventually end up outside. The hat will be removed at that point too, and I’ll put what’s left on a Mini Black Hat Hacker. It will be half as big as it is now. The bits that go outside is the next bit I’ll be working on. I have to order some more stuff for that. I’m probably going to go wireless for the data transfer. A micro controller with the BME280 and UV sensor attached to it. Along with the windspeed etc sensors.

1 Like

Plugged in a USB battery pack today to take it outside to test the UV code. It read 2 which is what it was with the hazy sky we had. Something to keep in mind is most plastics and glass block UV light. It wasn’t always this way but its pretty well SOP these days to block UV light.
I have another similar portable build with the same UV light sensor in it. It’s in a weatherproof enclosure with a clear plastic front. That clear plastic blocks UV light. I had to make a hole in it and then cover it with quartz crystal glass. It’s what microscope slides are made of. I bummed a couple from my friendly neighborhood veterinarian. If you don’t own a pet you might be able to get one from your doctor. It saves ordering a sheet online and hoping it doesn’t get broken in transit.

Put this together today. PICO Omnibus, PICO Proto, and 4 Breakout Garden i2c Extenders, just the socket end.
I had no way to add the PICO Wireless pack to my PICO Breakout garden Base. And no, a stacking header wouldn’t work, trust me.
I didn’t have a PICO Breakout Garden Base, plus I needed at least 3 i2c sockets.
RTC, BME280, VEML6075 uv sensor.
Really need a Pico Decker (Quad Expander) I need to add another Pico Proto to hook up to the wind vane rain bucket.
Still early stages yet. Lots of coding to do to get it all working as I want. Fingers crossed I have the skills to pull it off. =)

Do you really need the RTC? You can get the time from the wireless module and set utime then use that. You could reset twice a day or on the hour for better accuracy. I’m watching with interest. Best of luck.

I had a spare RV3028 on hand, its supported in the Pimoroni uf2, so for now why not.
The final version is likely to be PICO > Pico Proto with stacking header > Pico Wireless. I’ll just run cables off of the Pico Proto to the various sensors etc. The UV sensor is going to be in one place, and the BME280 in another. The RV3028 will be on the Proto if there is room. i2c for the sensors and ADC etc for the wind vane.
EDIT: I have the Wind Vane here still in the box, only just got it the other day. All I can do is test it to make sure there are no defects and then put it away for Christmas.

I now have the Wind and Rain Sensors linked to above setup. Made a temporary indoor stand for it, for now. Just some left over bits of wood I had kicking around. Time to get back into the coding part of this build. I’ll put some more pictures up when I get a chance.
With my current setup I can do it all from my Pi 400. The pHat Stack indoor part is plugged into its GPIO header, and PICO outside end via USB for now. I’ll worry about the WIFI bit latter on. I want to nail down the Wind & Rain sensor code first.

Winds in UK in the last week would have given you some interesting readings!

How are you getting on?

My current snag is getting my VEML6075 breakout to work in Micro Python. It doesn’t want to play well with my other breakouts.
Veml6075 MicroPython driver? - Support - Pimoroni Buccaneers

My current mockup is on a large solderless breadboard.
Pico Lipo 16 mb version
Pico Display Pack v2. 240 x 320
1.54 LCD breakout, 240 x 240
BME280 (indoor)
BME688 (outdoor)
LTR-559 Light LUX sensor breakout
VEML6075 UV sensor breakout
RV3028 RTC

What’s left is to get the wind and rain sensor code setup, and the UV sensor working.
Then it will be time to split things up. The two displays will come off and a wifi pack will go on to send the readings to another PICO or Pi that’s indoors. I’ll split the code up and have the displays on the indoor side of it. The rest of it will be outside in a box.

My current micro python main.py is as follows.

import time
import picodisplay2 as display2
from machine import ADC, Pin
from pimoroni_i2c import PimoroniI2C
from breakout_colourlcd240x240 import BreakoutColourLCD240x240
from breakout_bme280 import BreakoutBME280
from breakout_bme68x import BreakoutBME68X
from breakout_ltr559 import BreakoutLTR559
from breakout_rtc import BreakoutRTC

vsys = ADC(29)              # reads the system input voltage
charging = Pin(24, Pin.IN)  # reading GP24 tells us whether or not USB power is connected
conversion_factor = 3 * 3.3 / 65535

full_battery = 4.2                  # these are our reference voltages for a full/empty battery, in volts
empty_battery = 2.8                 # the values could vary by battery size/manufacturer so you might need to adjust them

display_buffer = bytearray(320 * 240 * 2)  # 2-bytes per pixel (RGB565)
display1 = BreakoutColourLCD240x240(display_buffer, cs=(22), bl=(21))
display2.init(display_buffer)
display1.set_backlight(0.8)
display2.set_backlight(0.8)

PINS_BREAKOUT_GARDEN = {"sda": 4, "scl": 5}
PINS_PICO_EXPLORER = {"sda": 20, "scl": 21}
i2c = PimoroniI2C(**PINS_BREAKOUT_GARDEN)

bme_out = BreakoutBME68X(i2c)
bme_in = BreakoutBME280(i2c,0x77)

ltr = BreakoutLTR559(i2c)

rtc = BreakoutRTC(i2c)
rtc.set_backup_switchover_mode(3)
rtc.set_24_hour()
rtc.update_time()

min_temp_in = None
max_temp_in = None
min_temp_out = None
max_temp_out = None
min_press_out = None
max_press_out = None

start_time = time.time()

rtc.enable_periodic_update_interrupt(True)

while True:
    
    if rtc.read_periodic_update_interrupt_flag():
        rtc.clear_periodic_update_interrupt_flag()

        if rtc.update_time():
            rtc_date = rtc.string_date()
            rtc_time = rtc.string_time()
    
    time_elapsed = time.time() - start_time
        
    # read the sensors
    temp_in, press_in, hum_in = bme_in.read()
    temp_out, press_out, hum_out, gas_resistance, status, gas_index, meas_index = bme_out.read() 
            
    # convert pressure to mb
    pressuremb = press_out / 100
    
    # header
    display1.set_pen(200, 200, 200)
    display1.text("in", 30, 0, 240, 3)
    display1.text("out", 170, 0, 240, 3)
    display1.text("min", 95, 78, 240, 3)
    display1.text("max", 92, 100, 240, 3)
       
    # indoor temperature
    temp_in = round(temp_in)
    
    if temp_in < 0:
        display1.set_pen(255, 255, 255)
    elif 0 <= temp_in < 12:
        display1.set_pen(0, 0, 255)
    elif 12 <= temp_in < 17:
        display1.set_pen(255, 255, 0)
    elif 17 <= temp_in < 25:
        display1.set_pen(0, 255, 0)
    elif 25 <= temp_in < 30:
        display1.set_pen(255, 140, 0)
    elif temp_in >= 30:
        display1.set_pen(255, 0, 0)
    else:
        display1.set_pen(0, 0, 0)
        
    display1.text('{:.0f}'.format(temp_in) + '`c', 15, 35, 240, 4)

    # outdoor temperature
    temp_out = round(temp_out)
    if temp_out < 0:
        display1.set_pen(255, 255, 255)
    elif 0 <= temp_out < 12:
        display1.set_pen(0, 0, 255)
    elif 12 <= temp_out < 17:
        display1.set_pen(255, 255, 0)
    elif 17 <= temp_out < 25:
        display1.set_pen(0, 255, 0)
    elif 25 <= temp_out < 30:
        display1.set_pen(255, 140, 0)
    elif temp_out >= 30:
        display1.set_pen(255, 0, 0)
    else:
        display1.set_pen(0, 0, 0)
        
    display1.text('{:.0f}'.format(temp_out) + '`c', 160, 35, 240, 4)

    # indoor min max temperature readings
    if time_elapsed > 5:
        if min_temp_in is not None and max_temp_in is not None:
            if temp_in < min_temp_in:
                min_temp_in = int(temp_in)
            elif temp_in > max_temp_in:
                max_temp_in = int(temp_in)
        else:
            min_temp_in = int(temp_in)
            max_temp_in = int(temp_in)
            
    if min_temp_in is not None and max_temp_in is not None:
        min_string_in = ('{:.0f}'.format(min_temp_in))
        max_string_in = ('{:.0f}'.format(max_temp_in))
    else:
        min_string_in = ""
        max_string_in = ""
        
    if min_temp_in is not None and max_temp_in is not None:
        if min_temp_in < 0:  # very cold
            display1.set_pen(255, 255, 255)
        elif 0 <= min_temp_in < 12:  # cold
            display1.set_pen(0, 0, 255)
        elif 12 <= min_temp_in < 17: # cool
            display1.set_pen(255, 255, 0)
        elif 17 <= min_temp_in < 25: # warm
            display1.set_pen(0, 255, 0)
        elif 25 <= min_temp_in < 30: # hot
            display1.set_pen(255, 140, 0)
        elif min_temp_in >= 30:      # very hot
            display1.set_pen(255, 0, 0)
        else:
            display.set_pen(0, 0, 0)
            
        display1.text(min_string_in, 25, 78, 240, 3)
        
        if max_temp_in < 0:  # very cold
            display1.set_pen(255, 255, 255)
        elif 0 <= max_temp_in < 12:  # cold
            display1.set_pen(0, 0, 255)
        elif 12 <= max_temp_in < 17: # cool
            display1.set_pen(255, 255, 0)
        elif 17 <= max_temp_in < 25: # warm
            display1.set_pen(0, 255, 0)
        elif 25 <= max_temp_in < 30: # hot
            display1.set_pen(255, 140, 0)
        elif max_temp_in >= 30:      # very hot
            display1.set_pen(255, 0, 0)
        else:
            display1.set_pen(0, 0, 0)
            
        display1.text(max_string_in, 25, 100, 240, 3)  

    # outdoor min max temperature readings
    if time_elapsed > 5:
        if min_temp_out is not None and max_temp_out is not None:
            if temp_out < min_temp_out:
                min_temp_out = int(temp_out)
            elif temp_out > max_temp_out:
                max_temp_out = int(temp_out)
        else:
            min_temp_out = int(temp_out)
            max_temp_out = int(temp_out)
            
    if min_temp_out is not None and max_temp_out is not None:
        min_string_out = ('{:.0f}'.format(min_temp_out))
        max_string_out = ('{:.0f}'.format(max_temp_out))
    else:
        min_string_out = ""
        max_string_out = ""
        
    if min_temp_out is not None and max_temp_out is not None:
        if min_temp_out < 0:  # very cold
            display1.set_pen(255, 255, 255)
        elif 0 <= min_temp_out < 12:  # cold
            display1.set_pen(0, 0, 255)
        elif 12 <= min_temp_out < 17: # cool
            display1.set_pen(255, 255, 0)
        elif 17 <= min_temp_out < 25: # warm
            display1.set_pen(0, 255, 0)
        elif 25 <= min_temp_out < 30: # hot
            display1.set_pen(255, 140, 0)
        elif min_temp_out >= 30:      # very hot
            display1.set_pen(255, 0, 0)
        else:
            display1.set_pen(0, 0, 0)
            
        display1.text(min_string_out, 180, 78, 240, 3)
        
        #max_temp_out = round(max_temp_out)
        
        if max_temp_out < 0:  # very cold
            display1.set_pen(255, 255, 255)
        elif 0 <= max_temp_out < 12:  # cold
            display1.set_pen(0, 0, 255)
        elif 12 <= max_temp_out < 17: # cool
            display1.set_pen(255, 255, 0)
        elif 17 <= max_temp_out < 25: # warm
            display1.set_pen(0, 255, 0)
        elif 25 <= max_temp_out < 30: # hot
            display1.set_pen(255, 140, 0)
        elif max_temp_out >= 30:      # very hot
            display1.set_pen(255, 0, 0)
        else:
            display1.set_pen(0, 0, 0)
            
        display1.text(max_string_out, 180, 100, 240, 3)

    # indoor humidity
    
    if hum_in < 30:
        display1.set_pen(255, 140, 0)
    elif 30 <= hum_in < 61:
        display1.set_pen(0, 255,0)
    elif 61 <= hum_in < 81:
        display1.set_pen(255, 255, 0)
    elif hum_in >= 81:
        display1.set_pen(255, 0, 0)
    else:
        display1.set_pen(0, 0, 0)
        
    #display1.text((int(hum_in)), 20, 80, 240, 3)
    display1.text('{:.0f}'.format(hum_in) + '%', 10, 140, 240, 4)
  
    # outdoor humidity
    
    if hum_out < 30:
        display1.set_pen(255, 140, 0)
    elif 30 <= hum_out < 61:
        display1.set_pen(0, 255,0)
    elif 61 <= hum_out < 81:
        display1.set_pen(255, 255, 0)
    elif hum_out >= 81:
        display1.set_pen(255, 0, 0)
    else:
        display1.set_pen(0, 0, 0)
        
    #display1.text((int(hum_in)), 20, 80, 240, 3)
    display1.text('{:.0f}'.format(hum_out) + '%', 160, 140, 240, 4)

    # battery state
    voltage = vsys.read_u16() * conversion_factor
    percentage = 100 * ((voltage - empty_battery) / (full_battery - empty_battery))
    if percentage > 100:
        percentage = 100.00
    
    if charging.value() == 1:         # if it's plugged into USB power...
        display1.set_pen(0, 255, 0)
        display1.text("ok", 20, 200, 240, 3)
        #display1.text('{:.1f}'.format(voltage) + "v", 10, 200, 240, 3)
        display1.text("ok", 170, 200, 240, 3)
        display1.text('{:.0f}%'.format(percentage), 5, 220, 240, 3)
        display1.text('{:.0f}%'.format(percentage), 155, 220, 240, 3)
        display1.set_backlight(0.8)
        display2.set_backlight(0.8)
        display2.set_led(0,0,225)
    else:                             # if not, display the battery stats
        display1.set_pen(255, 255, 0)
        display1.text('{:.1f}'.format(voltage) + "v", 10, 200, 240, 3)
        display1.text('{:.0f}%'.format(percentage), 5, 220, 240, 3)
        display1.text('{:.1f}'.format(voltage) + "v", 160, 200, 240, 3)
        display1.text('{:.0f}%'.format(percentage), 155, 220, 240, 3)
        display1.set_backlight(0.4)
        display2.set_backlight(0.4)
        display2.set_led(125,0,0)
        
    # time to update display 1
    display1.update()
    display1.set_pen(0, 0, 0)
    display1.clear()
                                         
    display2.set_pen(200, 200, 200)
    
    hours = rtc.get_hours()
    minutes = rtc.get_minutes()
    display2.text(rtc.string_date(), 30, 0, 180, 3)
    #display2.text(f"{hours:02}:{minutes:02}", 190, 0, 320, 3)
    
    if hours <12:
        display2.text(f"{hours:2}:{minutes:02}:am", 190, 0, 240, 3)
    elif hours == 12:
        display2.text(f"{hours:2}:{minutes:02}:pm", 190, 0, 240, 3)
    elif hours >12:
        hours = hours - 12
        display2.text(f"{hours:2}:{minutes:02}:pm", 190, 0, 240, 3)
        
    # outddor pressure reading on display 2    
    if pressuremb < 982:
        display2.set_pen(255, 0, 0)
        display2.text('{:.0f}'.format(pressuremb) + 'mb', 0, 110, 240, 3)
        display2.text("very low", 105, 110, 240, 3)
    elif 982 <= pressuremb < 1004:
        display2.set_pen(255, 255, 0)
        display2.text('{:.0f}'.format(pressuremb) + 'mb', 0, 110, 240, 3)
        display2.text("low", 105, 110, 240, 3)
    elif 1004 <= pressuremb < 1026:
        display2.set_pen(0, 255, 0)
        display2.text('{:.0f}'.format(pressuremb) + 'mb', 0, 110, 240, 3)
        display2.text("unsetled", 105, 110, 240, 3)
    elif 1026 <= pressuremb < 1048:
        display2.set_pen(0, 0, 255)
        display2.text('{:.0f}'.format(pressuremb) + 'mb', 0, 110, 240, 3)
        display2.text("high", 105, 110, 240, 3)
    elif pressuremb >= 1048:
        display2.set_pen(255, 140, 0)
        display2.text('{:.0f}'.format(pressuremb) + 'mb', 0, 110, 240, 3)
        display2.text("very high", 105, 110, 240, 3)
    else:
        display2.set_pen(0, 0, 0)
        display2.text('{:.0f}'.format(pressuremb) + 'mb', 0, 110, 240, 3)
        display2.text("", 105, 110, 240, 3)
         
    reading = ltr.get_reading()
    #print("Lux:", reading[BreakoutLTR559.LUX], "Prox:", reading[BreakoutLTR559.PROXIMITY])
    light = reading[BreakoutLTR559.LUX]
    
    display2.set_pen(0, 255, 0)
    display2.text("sun", 0, 70, 240, 3)
    
    #Convert light level in lux to descriptive value.
     
    if light < 50:
        display2.text("dark", 60, 70, 240, 3)
    elif 50 <= light < 100:
        display2.text("dim", 60, 70, 240, 3)
    elif 100 <= light < 500:
        display2.text("light", 60, 70, 240, 3)
    elif light >= 500:
        display2.text("bright", 60, 70, 240, 3)

    # wind speed
    display2.set_pen(255, 255, 255)
    display2.text("wind:", 0, 190, 240, 3)
    display2.text("NE", 80, 190, 240, 3)
    
    # wind direction
    display2.set_pen(255, 255, 255)
    display2.text("36 km/h", 130, 190, 240, 3)
        
    # percipitaion
    display2.set_pen(255, 255, 255)
    display2.text("rain fall:", 0, 220, 240, 3)
    display2.text("30 mm", 150, 220, 240, 3)
    
        
    # update display 2
    display2.update()
    display2.set_pen(0, 0, 0)
    display2.clear()
    
    time.sleep(1.0)
    

Might be throwing in the towel on this one. As far as using a Pico to display the data goes.
It’s looking more and more like Pico outside collecting data and Pi inside displaying it.
The Pimoroni Micro Python drivers for the Packs are so locked in to the Pins they use that its a PITA to make it work the way " I " want.
I can’t use two Display Packs even if I wire them up to different Chip Select. The driver doesn’t support alternate pin selection. And it looks like I can’t use the Wireless Pack with a Display Pack for the same reason. Totally frustrated at the moment. But, that’s the way it goes some times.

Trying to run the Pico Wireless pack “and” a Pico Display Pack on a Pico Omnibus failed, neither one would work. Cutting the two SD DA jumpers on the Wireless pack let me use one or the other but not both at the same time. I could scan for networks, “or” run a code on the display, but not both at the same time. That’s a deal breaker for this project. =(

On a more positive note, progress is happening on the display side of things.
Pico Display Pack V2 x 2? · Issue #299 · pimoroni/pimoroni-pico (github.com)
Unified display drivers · Issue #309 · pimoroni/pimoroni-pico (github.com)

Phil Howard @gadgetoid has updated / fixed the generic st7789 driver.

I can now run two Display Pack V2’s side by side in portrait mode without issue. And have access to the full 320 height and 240 width. woot =)
I don’t have the buttons or LED’s wired up on this setup just yet.
The Display Packs are each mounted to Perma Proto half size, and the Pico to another Perma Proto half size. I just soldered male header on the Perma Proto’s and then soldered wires from board to board for SPI and power.

A big big thankyou Phil. A big thumbs up.
I’ll be starting a new thread as my build is now Pico based instaed of Raspberry Pi based.

My test file is as follows.

import time

import st7789
frame_buffer = bytearray(240 * 320 * 2)  # 2-bytes per pixel (RGB565)
display1 = st7789.ST7789(width=240, height=320, buffer=frame_buffer, slot=0) 
display2 = st7789.ST7789(width=240, height=320, buffer=frame_buffer, slot=1) 
display1.set_backlight(1.0)
display2.set_backlight(1.0)

print(display1)
print(display2)

while True:
    display1.set_pen(0, 0, 255)
    display1.clear()
    display1.update()
    display1.set_pen(0, 0, 0)  # Set pen to black
    display1.text("display 1", 10, 10, 240, 5)  
    display1.update()
    display1.clear()
    
    display2.set_pen(0, 255, 0)
    display2.clear()
    display2.update()
    display2.set_pen(0, 0, 0)  # Set pen to black
    display2.text("display 2", 10, 10, 240, 5)  
    display2.update()
    display2.clear()
    
    time.sleep(2)
    
    display1.set_pen(0, 255, 0)
    display1.clear()
    display1.update()
    display1.set_pen(0, 0, 0)  # Set pen to black
    display1.text("display 1 slot 0", 10, 10, 240, 5)  
    display1.update()
    display1.clear()
    
    display2.set_pen(0, 255, 255)
    display2.clear()
    display2.update()
    display2.set_pen(0, 0, 0)  # Set pen to black
    display2.text("display 2 slot 1", 10, 10, 240, 5)  
    display2.update()
    display2.clear()
    
    time.sleep(2)
    
    display1.set_pen(0, 255, 255)
    display1.clear()
    display1.update()
    display1.set_pen(0, 0, 0)  # Set pen to black
    display1.text("display 1 slot 0 BG_front", 10, 10, 240, 5)  
    display1.update()
    display1.clear()
    
    display2.set_pen(255, 0, 0)
    display2.clear()
    display2.update()
    display2.set_pen(0, 0, 0)  # Set pen to black
    display2.text("display 2 slot 1 BG_back", 10, 10, 240, 5)  
    display2.update()
    display2.clear()
    
    time.sleep(2)
    
    display1.set_pen(255, 0, 0)
    display1.clear()
    display1.update()
    display1.set_pen(0, 0, 0)  # Set pen to black
    display1.text("display 1 slot 0 BG_front cs=(17)", 10, 10, 240, 5) 
    display1.update()
    display1.clear()
    
    display2.set_pen(255, 0, 255)
    display2.clear()
    display2.update()
    display2.set_pen(0, 0, 0)  # Set pen to black
    display2.text("display 2 slot 1 BG_back cs=(22)", 10, 10, 240, 5) 
    display2.update()
    display2.clear()
    
    time.sleep(2)
    
    display1.set_pen(255, 0, 255)
    display1.clear()
    display1.update()
    display1.set_pen(0, 0, 0)  # Set pen to black
    display1.text("display 1 slot 0 BG_front cs=(17) bl=(20)", 10, 10, 240, 5) 
    display1.update()
    display1.clear()
    
    display2.set_pen(255, 255, 0)
    display2.clear()
    display2.update()
    display2.set_pen(0, 0, 0)  # Set pen to black
    display2.text("display 2 slot 1 BG_back cs=(22) bl=(21)", 10, 10, 240, 5)
    display2.update()
    display2.clear()
    
    time.sleep(2)
    
    display1.set_pen(255, 255, 0)
    display1.clear()
    display1.update()
    display1.set_pen(0, 0, 0)  # Set pen to black
    display1.text("display 1 slot 0 BG_front cs=(17) bl=(20) st7789", 10, 10, 240, 5)  
    display1.update()
    display1.clear()
    
    display2.set_pen(0, 0, 255)
    display2.clear()
    display2.update()
    display2.set_pen(0, 0, 0)  # Set pen to black
    display2.text("display 2 slot 1 BG_back cs=(22) bl=(21) st7789", 10, 10, 240, 5) 
    display2.update()
    display2.clear()
    
    time.sleep(2)
    
    display1.set_pen(255, 255, 0)
    display1.clear()
    display1.update()
    display1.set_pen(0, 0, 0)  # Set pen to black
    display1.text("display 1 slot 0 BG_front cs=(17) bl=(20) st7789 240 x 320", 10, 10, 240, 5)  
    display1.update()
    display1.clear()
    
    display2.set_pen(0, 0, 255)
    display2.clear()
    display2.update()
    display2.set_pen(0, 0, 0)  # Set pen to black
    display2.text("display 2 slot 1 BG_back cs=(22) bl=(21) st7789 240 x 320", 10, 10, 240, 5) 
    display2.update()
    display2.clear()
    
    time.sleep(2)
    
    display1.set_pen(255, 255, 0)
    display1.clear()
    display1.update()
    display1.set_pen(0, 0, 0)  # Set pen to black
    display1.text("display 1 slot 0 BG_front cs=(17) bl=(20) st7789 240 x 320 portrait", 10, 10, 240, 5)  
    display1.update()
    display1.clear()
    
    display2.set_pen(0, 0, 255)
    display2.clear()
    display2.update()
    display2.set_pen(0, 0, 0)  # Set pen to black
    display2.text("display 2 slot 1 BG_back cs=(22) bl=(21) st7789 240 x 320 portrait", 10, 10, 240, 5) 
    display2.update()
    display2.clear()
    
    time.sleep(2)    
1 Like

New topic is here. =)

Pi Pico based Weather Station Project - Discussion / Projects - Pimoroni Buccaneers