forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
boardNew board or update to a single boardNew board or update to a single boardbugrp2040Raspberry Pi RP2040Raspberry Pi RP2040
Milestone
Description
CircuitPython version
Adafruit CircuitPython 7.0.0-alpha.3-471-g7f39779f4 on 2021-07-01; Adafruit Macropad RP2040 with rp2040Code/REPL
import board
import displayio
from adafruit_displayio_sh1106 import SH1106
OLED_WIDTH = 128
OLED_HEIGHT = 64
displayio.release_displays()
display_bus = displayio.FourWire(
board.SPI(),
command=board.OLED_DC,
chip_select=board.OLED_CS,
reset=board.OLED_RESET,
baudrate=1000000,
)
display = SH1106(display_bus, width=OLED_WIDTH, height=OLED_HEIGHT)Behavior
When creating display_bus, the board locks. Serial stops responding and the CIRCUITPY drive becomes unavailable.
Description
No response
Additional information
Using busio, the display initializes as expected.
import board
import displayio
import busio
from adafruit_displayio_sh1106 import SH1106
OLED_WIDTH = 128
OLED_HEIGHT = 64
displayio.release_displays()
spi = busio.SPI(board.SCK, board.MOSI)
display_bus = displayio.FourWire(
spi,
command=board.OLED_DC,
chip_select=board.OLED_CS,
reset=board.OLED_RESET,
baudrate=1000000,
)
display = SH1106(display_bus, width=OLED_WIDTH, height=OLED_HEIGHT)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
boardNew board or update to a single boardNew board or update to a single boardbugrp2040Raspberry Pi RP2040Raspberry Pi RP2040