Need Help Please SSD1351 and Metro M4

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Billr083046
 
Posts: 16
Joined: Fri Jul 24, 2015 3:41 pm

Need Help Please SSD1351 and Metro M4

Post by Billr083046 »

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

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Need Help Please SSD1351 and Metro M4

Post by dastels »

What is the output in the REPL?

If you aren't familiar with using the REPL (or even just the serial connection), see
https://learn.adafruit.com/welcome-to-c ... al-console
https://learn.adafruit.com/welcome-to-c ... al-console
https://learn.adafruit.com/welcome-to-c ... n/the-repl

Dave

User avatar
Billr083046
 
Posts: 16
Joined: Fri Jul 24, 2015 3:41 pm

Re: Need Help Please SSD1351 and Metro M4

Post by Billr083046 »

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

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

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: Need Help Please SSD1351 and Metro M4

Post by dastels »

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

Dave

User avatar
Billr083046
 
Posts: 16
Joined: Fri Jul 24, 2015 3:41 pm

Re: Need Help Please SSD1351 and Metro M4

Post by Billr083046 »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”