Hello,
I'm trying to make my adafruit oled work with my bela mini.
[https://www.adafruit.com/product/1431]
I'm used to work with raspberry pis & arduinos but pretty new to bela / beaglebone.
I'm using adafruit blinka libraries.
I've adapted the following example code
[https://github.com/adafruit/Adafruit_CircuitPython_SSD1351]
I just changed the SPI to work with SPI1 and the pins
import board
import busio
import displayio
from adafruit_ssd1351 import SSD1351
spi = busio.SPI(board.SCLK_1, board.MOSI_1, board.MISO_1)
print("SPI_1 ok!")
oled_cs = board.P2_31
oled_dc = board.P2_19
oled_rst = board.P2_17
displayio.release_displays()
display_bus = displayio.FourWire(spi, command=oled_dc, chip_select=oled_cs, reset=oled_rst)
print("display_bus ok!")
display = SSD1351(display_bus, width=128, height=128)
print("SSD1351 ok!")
# Make the display context
splash = displayio.Group()
display.show(splash)
print("display.show(splash) ok!")
color_bitmap = displayio.Bitmap(128, 128, 1)
color_palette = displayio.Palette(1)
color_palette[0] = 0xFF0000
bg_sprite = displayio.TileGrid(color_bitmap,
pixel_shader=color_palette,
x=0, y=0)
splash.append(bg_sprite)
print("splash.append(bg_sprite) ok!")
#while True:
# pass
The display doesn't display anything and the bela systems doesn't seem to like my code (lots of PRU interrupt timeout and McASP error after splash.append(bg_sprite)
)
I've tried to use config-pin but I'm not sure what I'm doing.
The oled works fine with an Arduino.
Is there something special to do to use the SPI1 other than config-pin 2_25 spi / config-pin 2_27 spi / config-pin 2_29 spi_sclk / config-pin 2_31 spi_cs
?
Should I use the free pins or D1-D12 pins for the RST & DC pins ?
Thanks
Léo