Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

Need Help Please SSD1351 and Metro M4
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Need Help Please SSD1351 and Metro M4

by Billr083046 on Fri Jun 04, 2021 12:37 pm

II wanted an ssd1351 128x128 OLED display but Adafruit was out of stock so I purchased a waveshare 128x128 without an sd card. I am having problems getting it to work on the Metro M4.
I set it up on my Uno Rev3 and it works so no problems with the device. Cannot get it to work with the Metro M4 and curcuitphython. It is probably as simple as me missing something in the lib. I used the same pinouts on the Metro M4 as I did on the Uno Rev3. I am now at this point a little confused at what to include in the lib for the ssd1351. I have tried the simpletest.py and connot get it to work. Any helpwould be appreciated. The following is the files from lib. I do a maual command on the serial they are okay
borad is wire same as in the simpletest cs=D5, dc=D6, reset=d9, Din on waveshare is D11, Clk=D13 Vcc=5volts and Ground
import board
import terminalio
import displayio
from adafruit_display_text import label
from Adafruit_ssd1351 import adafruit_ssd1351
any help would be appreciated
Thanks
Bill Roberts
Attachments
ssd1351_simpletest.py
this is the program I am trying to run
(1.48 KiB) Downloaded 2 times

Billr083046
 
Posts: 13
Joined: Fri Jul 24, 2015 3:41 pm

Re: Need Help Please SSD1351 and Metro M4

by dastels on Fri Jun 04, 2021 2:56 pm


dastels
 
Posts: 6475
Joined: Tue Oct 20, 2015 3:22 pm

Re: Need Help Please SSD1351 and Metro M4

by Billr083046 on Sun Jun 06, 2021 12:15 pm

Dave on the REPL(serial ) I get a code done running. I did a check code and returns Awesome, Zero problems found. I go to REPL and type in each line by line and verify the directories that have been imported using dir() I cannot find any problems so my next guess am I using the correct pinouts for the ssd1351 default for ssd1351 is 4wire which I verified. This is just a simple display code am I looking at something wrong?
Din-D11
Cs-D10
Clk-D13
Dc-D8
Reset
Vcc-5V
Gnd-gnd

is SS1351 in lne 3 the driver file?
This is the exact code I am running for the display.

Code: Select all | TOGGLE FULL SIZE
import board
import displayio
from waveshare_ssd1351 import SSD1351

# spi = board.SPI()
# tft_cs = board.D10
# tft_dc = board.D8

displayio.release_displays()
display_bus = displayio.FourWire(board.SPI(),
                                 command=board.D8, chip_select=board.D10,
                                 reset=board.D9,
                                 baudrate=16000000)

display = SSD1351(display_bus, width=128, height=128)

# Make the display context
splash = displayio.Group(max_size=10)
display.show(splash)

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)

while True:
    pass

Billr083046
 
Posts: 13
Joined: Fri Jul 24, 2015 3:41 pm

Re: Need Help Please SSD1351 and Metro M4

by dastels on Sun Jun 06, 2021 2:09 pm

It might be your wiring. See the "Middle" and "Right Side" sections of https://learn.adafruit.com/adafruit-grand-central/pinouts regarding the SPI pins.

Dave

dastels
 
Posts: 6475
Joined: Tue Oct 20, 2015 3:22 pm

Re: Need Help Please SSD1351 and Metro M4

by Billr083046 on Tue Jun 15, 2021 10:16 pm

Dave
Ok got rid of curcuitpython used the Ardiuno IDE set up the correct libraries used a sample sketch from Adafruit used the sketch without sd card and everything works great. So now I have to work forward to understand curcuitphyton and all the requirements.

Bill Roberts

Billr083046
 
Posts: 13
Joined: Fri Jul 24, 2015 3:41 pm

Please be positive and constructive with your questions and comments.