Posts

Showing posts with the label display SSD1306 SPI OLED

Multi SSD1306 OLED, on Raspberry Pi Pico 2/MicroPython

Image
My exercise on  Raspberry Pi Pico 2 (RP2350) running MicroPython v1.24.0-preview.321, to display on two  128x64 SSD1315 I2C OLED (SSD1306 compatible) , and one  128x64 SSD1306 SPI OLED . The 3rd, 4th and 5th exercises display on three OLEDs as one framebuf. In the 4th and 5th exercises, groupedOLED_class is implemented, make it easier to append OLEDs at runtime. Two I2C SSD1306 OLED share the same I2C bus with different address. Connection: Exercise code: mpyPico2_tri_oled_hello.py , a simple hello world display on 3 OLED separately. """ MicroPython/Raspberry Pi Pico 2 exercise display on three OLED, 0.96" 128x64 SSD1306 OLED - two I2C OLED share one I2C with different I2C address - and one SPI OLED. To install MicroPython ssd1306 driver on Pico 2. read: https://coxxect.blogspot.com/2024/09/i2c-oled-ssd1306ssd1315-screen-with.html Two I2C OLEDs are connected to the same I2C(0) with different I2C address The I2C address of the left ...

Raspberry Pi Pico 2 (RP2350)/MicroPython display on two OLED, SSD1306 I2C and SPI.

Image
In previous I exercised on Raspberry Pi Pico 2 /MicroPython to display on I2C SSD1306 OLED and SPI SSD1306 OLED . In this post display on both I2C and SPI SSD1306 OLED. Remark: when I test the code, base on MicroPython v1.24.0-preview.321 on Raspberry Pi Pico 2 normal RP2350 and RP2350-RISCV version. It's found something strange when running on  RP2350-RISCV version. Check the video at 4:30. - The MicroPython running in a loop, without time.sleep(). - If "Stop" on Thonny IDE clicked to stop from running, the Pico 2 will disconnected, and REPL fail. - ----- Have to reboot the Pico to re-connect. It should be a MicroPython issue, not SSD1306 issue. Connection: Connection between Raspberry Pi Pico 2 and I2C/SPI SSD1306 OLED I2C SSD1306 - SCL GP5 - SDA GP4 SPI SSD1306 - D/C GP13 - RST GP12 - SDA GP11 (mosi) - SCL GP10 (sck) - VCC 3V3 - GND GND GP9 (dummy cs) - No connection GP8 (miso) - No connection Exercise Code: To ins...

Raspberry Pi Pico 2/MicroPython display on SPI SSD1306 OLED

Image
Last post show how to install MicroPython ssd1306 driver on Raspberry Pi Pico 2 in Thonny, and display on 0.96 inch 128x64 SSD1315 I2C OLED (SSD1306 compatible) . Here is how to using the ssd1306 driver, display on 0.96 inch 128x64 SSD1306 SPI OLED . Connection: SPI SSD1306 OLED     Raspberry Pi Pico 2 ======================================== - D/C      GP13 - RST      GP12 - SDA      GP11 (mosi) - SCL      GP10 (sck) - VCC      3V3 - GND      GND      GP9 (dummy cs) - No connection      GP8 (miso) - No connection Notice that my SPI SSD1306 OLED is 6 pins version, no cs on board. But it's required in ssd1306 driver, so I have to assign dummy GP9 for it. Also GP8 is the SPI MISO, not use in this case. Exercise Code: mpyPico2_SSD1306_spi_hello.py , a simple exercise to say Hello. """ MicroPython/Raspb...

Xiao ESP32C3 display on SSD1306 128x64 OLED (I2C & SPI) using U8g2 Library

Image
Xiao ESP32C3  (arduino-esp32 framework) exercise to display 128x64 SSD1306 OLED, both I2C and SPI. Tested on  XIAO Expansion board ,  SSD1315 I2C OLED (SSD1306 compatible) and  SSD1306 SPI OLED . U8g2 Library is used to drive the OLEDs, make sure it's installed in Arduino IDE. Connection for SPI interface: OLED SPI Xiao ESP32C3 GND GND VCC 3V3 SCL GPIO8 SDA GPIO10 RST GPIO2 D/C GPIO3 for I2C interface: OLED I2C Xiao ESP32C3 GND GND VCC 3V3 SCL GPIO7 SDA GPIO6 Exercise Code: XiaoESP32C3_Serial_Terminal.ino Accept user input from Serial Monitor, and display on OLED as a terminal (U8X8LOG). /* * Read from Serial and display on * XIAO Expansion board I2C SSD1306 OLED (128x64) * using U8g2 library. * In this exercise, the OLED act as a terminal (U8X8LOG). */ #include <Arduino.h> #include <U8x8lib.h> #ifdef U8X8_HAVE_HW_SPI #include <SPI.h> #endif // U8x8 Contructor U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*...

SSD1306 SPI OLED on Raspberry Pi Pico/CircuitPython using displayio

Image
Raspberry Pi Pico (RP2040) running CircuitPython 7.3.2, to drive  0.96" 128x64 SSD1306 SPI OLED  using displayio. Connection:      Raspberry Pi Pico ---------+ VBUS | VSYS | GND |      3V3_EN| 3V3 |---------------+ . | | . | | . | | . | | . | | GP22 |---x | GND | | GP21 |-----------+ | GP20 |---------+ | | GP19 |-------+ | | | GP18 |-----+ | | | | GND |--+ | | | | | GP17 } | | | | | | GP16 | | | | | | | ---------+ | | | | | | | | | | | |           SSD1306 | | | | | |           SPI OLED | | | | | |      ---------+ | | | | | | GND |--+ | | | | | VCC |-----|-|-|-|---+ SCL |-----+ | | | SDA |-------+ | | RST |---------+ | D/C ...