Raspberry Pi Pico 2/MicroPython to handle two SSD1306 OLEDs, in main thread and background thread.
This post list MicroPython exercises run on Raspberry Pi Pico 2 to handle two SSD1306 OLEDs, one in main thread and another one in background thread. Connection: To install micropython_ssd1306 on the Raspberry Pi Pico 2, and simple exercise (mpy_pico2_ssd1306.py), read previous post . Exercise Code: # mpy_pico2_dual_ssd1306.py # MicroPython exercise running on Raspberry Pi Pico 2 with RP2350 # to handle two 128x64 SSD1306 OLEDs, one by one. # # https://coxxect.blogspot.com/2026/10/raspberry-pi-pico-2micropython-to.html # import time from machine import Pin, I2C from ssd1306 import SSD1306_I2C from framebuf import FrameBuffer i2c0 = I2C(0) print(i2c0) print(i2c0.scan()) oled0 = SSD1306_I2C(128, 64, i2c0) print(oled0.width, "x", oled0.height) i2c1 = I2C(1) print(i2c1) print(i2c1.scan()) oled1 = SSD1306_I2C(128, 64, i2c1) print(oled1.width, "x", oled1.height) def fill_oled(oled_id, oled, ticks_ms, ticks_diff, sleep_ms): start_time = time.ticks_ms() ...