Skip to content

OLED does not display when writing firmware for the first time #37

@zou-hong-run

Description

@zou-hong-run

This code was invalid the first time it was run

from machine import Pin, SPI
import sh1106

spi = SPI(1, baudrate=1000000,sck=Pin(14),mosi=Pin(13))
display = sh1106.SH1106_SPI(128, 64, spi, Pin(5), Pin(2), Pin(4),rotate= 0, delay=0)
display.reset()
display.flip(True)
display.sleep(False)
display.fill(0)
display.text('hello world', 0,0, 1)
display.rect(0, 0, 50, 50, 1)
display.show()

print("testing")

This code is effective when OLED suddenly lights up,
It's very strange that I suddenly get better and can use it, but it won't show up when I write the program

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions