Cyber Deck Stemma Help

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
LoupRouge
 
Posts: 7
Joined: Thu Sep 30, 2021 11:04 am

Cyber Deck Stemma Help

Post by LoupRouge »

Hello community!

So I have been building my cyber deck and am currently stuck. I am running my pi400 with the Adafruit Cyberdeck Hat (Product ID: 4863) and was able to connect my PiTFT 80x320 3.5" (Product ID: 2097). I am trying to connect a Adafruit Grayscale 1.5" 128x128 (Product ID: 4741) via stemma on the hat. I have gone through the tutorials and get stuck on getting the grayscale working. I believe everything is installing but cannot get the grayscale to show anything.

Thanks in advance!

P.S.
I suspect that it's because I can't run another screen with the PiTFT connected but looking for guidance of those who know more than me. As a backup option if a direct connection cannot be made, would using a Adafruit Trinkey QT2040 (Product ID: 5056) work to get both screens working?
Attachments
grayscale 1.5 image.jpeg
grayscale 1.5 image.jpeg (523.13 KiB) Viewed 72 times
trinkey image.jpeg
trinkey image.jpeg (658.4 KiB) Viewed 72 times
cyberdeck hat image.jpeg
cyberdeck hat image.jpeg (76.3 KiB) Viewed 72 times

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cyber Deck Stemma Help

Post by adafruit_support_carter »

Try running an I2C scan just to check if the Pi is seeing the OLED:
https://learn.adafruit.com/scanning-i2c ... spberry-pi

In general, the TFT and OLED will be driven in different ways. The TFT can show the Pi's console, etc. But for the OLED, you'll just want to drive it directly via some additional code. See here:
https://learn.adafruit.com/adafruit-gra ... -and-usage

User avatar
LoupRouge
 
Posts: 7
Joined: Thu Sep 30, 2021 11:04 am

Re: Cyber Deck Stemma Help

Post by LoupRouge »

Thanks for the reply Carter!

Ok I ran the I2C scan and believe my Pi is seeing it. (Will post the code below.) I also went through and reinstalled the Circuit Python libraries. I ran the I2C and SPI check and it came back correct but when I ran the "Blinka Test" I got back and error. (Will post code below.) Do I have to route the command to the correct I2C?

BANNED@raspberrypi:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- 3d -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

BANNED@raspberrypi:~ $ ls /dev/i2c* /dev/spi*
/dev/i2c-1 /dev/spidev1.0 /dev/spidev1.1 /dev/spidev1.2
BANNED@raspberrypi:~ $ nano
BANNED@raspberrypi:~ $ python3 blinkatest.py
Hello blinka!
Digital IO ok!
I2C ok!
Traceback (most recent call last):
File "/home/BANNED/blinkatest.py", line 16, in <module>
spi = busio.SPI(board.SCLK, board.MOSI, board.MISO)
File "/home/BANNED/.local/lib/python3.9/site-packages/busio.py", line 301, in __init__
self._spi = _SPI(portId)
File "/home/BANNED/.local/lib/python3.9/site-packages/adafruit_blinka/microcontroller/generic_linux/spi.py", line 25, in __init__
self._spi = spi.SPI(device=(portid, 0))
File "/home/BANNED/.local/lib/python3.9/site-packages/Adafruit_PureIO/spi.py", line 167, in __init__
raise IOError("{} does not exist".format(device))
OSError: /dev/spidev0.0 does not exist

Please advise, thanks!

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cyber Deck Stemma Help

Post by adafruit_support_carter »

The Blinka test is not finding the expected SPI device entry. However, the OLED uses I2C. So go ahead and continue with the OLED guide and see if you can get the OLED working. It's showing up as expected at address 0x3D. The libraries will likely use that address by default.

User avatar
LoupRouge
 
Posts: 7
Joined: Thu Sep 30, 2021 11:04 am

Re: Cyber Deck Stemma Help

Post by LoupRouge »

Hello again!

I have been trying to get this to work over the past two days, still no dice. I have started from scratch by reflashing just incase I broke something or missed something. I think I have everything right following the OLED guide. I get stuck once I get to the "usage" section of https://learn.adafruit.com/adafruit-gra ... -and-usage .

Once I run to this section

"import displayio
import adafruit_ssd1327
display_bus = displayio.I2CDisplay(i2c, device_address=0x3D)"

I get back

"ModuleNotFoundError : No module named 'displayio"

I installed the Adafruit CircuitPython Library Bundle and the SSD1327 Module, I don't know how to troubleshoot this.
Please help, thank you!

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”