OK, after starting over and doing some sleuthing, I have text being displayed.
BG
Socket OLED
V+ GP Pin V+
CS 17 22 CS
SCLK 18 24 SCK
MOSI 19 25 MOSI
MISO 16 21 DC
GPIO 22 29 NC
Ground GND
It is the GP number, not the Pin number.
# sh1107 driver demo code v319
# this code is intended for a 128*128 pixel display
print('starting test')
# from machine import Pin, I2C
from machine import Pin, SPI
import sh1107
#print('dir sh1107: ', dir(sh1107))
import gc
import sys
import time #as time
import framebuf
import array
# basic test code SPI
spi0 = SPI(0, baudrate=1_000_000, sck=Pin(18), mosi=Pin(19), miso=Pin(16))
#display = sh1107.SH1107_SPI(64, 128, spi1, Pin(21), Pin(20), Pin(13))
display = sh1107.SH1107_SPI(128, 128, spi0, Pin(16), None, Pin(17), rotate=90)
display.fill(0)
display.text('SH1107', 0, 0, 1)
display.text('Driver', 0, 8, 1)
display.show()
#
time.sleep(2)
The 0, 0, 1 in display.text('SH1107', 0, 0, 1) translates to X, Y, C. C is color.
Now I just have to figure out if and how to make the text bigger? Right now it’s pretty small. Lean forward and squint small.
EDIT It looks like I needed to also copy the frambuf2.py file to the Pico. I have the long version of the demo file running now. I just have to figure out how to adjust the size of the large text. My neck and shoulders (chronic pain) are killing me at the moment and I’ll have to stop, and take a break. I’ve been at this most of the morning. Lunchtime now.