Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

feather 2040 and oled
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

feather 2040 and oled

by starblast321 on Sun Mar 07, 2021 2:37 pm

Hi I need some help. I have the new feather RP2040 and a ssd1327 OLED and thought this is a good match to learn about OLED displays. I have it hooked up to the RP2040 by a qt cable loaded up the simple ssd1327 python program and I cant get it to work. I have tried some different codes to try to get it to work all failed so I went back to the program from examples this is what I am getting.

1. # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2. # SPDX-License-Identifier: MIT
3.
4. import board
5. import displayio
6. import terminalio
7. from adafruit_display_text import label
8. import adafruit_ssd1327
9.
10. displayio.release_displays()
11.
12. # Use for I2C
13. i2c = board.I2C()
14. display_bus = displayio.I2CDisplay(i2c, device_address=0x3D)

code.py output:
Traceback (most recent call last):
File "code.py", line 13, in <module>
TimeoutError: Clock stretch too long

Code done running.

Screen is still blank and I don't under stand the error

i2c = board.I2C()
should there be pin listing in the () area even though its hooked up through the stemma ports

this part is not like wiring in led's, buttons, pir's and servos

starblast321
 
Posts: 14
Joined: Wed Sep 20, 2017 6:57 pm

Re: feather 2040 and oled

by danhalbert on Tue Mar 09, 2021 4:42 pm

Could you try two things:

Instead of `i2c = board.I2C()`, try one of these. If the first doesn't work, try the second.

i2c = busio.I2C(board.SCL, board.SDA)

i2c = bitbangio.I2C(board.SCL, board.SDA)


Also make sure that your SCL and SDA lines are not swapped by accident.

danhalbert
 
Posts: 2377
Joined: Tue Aug 08, 2017 12:37 pm

Re: feather 2040 and oled

by MakerMelissa on Tue Mar 09, 2021 5:51 pm

Hello,

I just tried it out and got the same "Clock Stretch too long" error as you. I tried Dan's suggestion of using:
Code: Select all | TOGGLE FULL SIZE
i2c = busio.I2C(board.SCL, board.SDA)

and that seemed to do the trick.

MakerMelissa
 
Posts: 252
Joined: Wed Jun 05, 2013 2:10 am

Re: feather 2040 and oled

by danhalbert on Tue Mar 09, 2021 6:26 pm

Make sure you are using 6.2.0-beta.3 or later.

danhalbert
 
Posts: 2377
Joined: Tue Aug 08, 2017 12:37 pm

Re: feather 2040 and oled

by danhalbert on Thu Mar 11, 2021 12:56 am

@starblast321 did you see this problem with beta.3, or was it an earlier beta?

danhalbert
 
Posts: 2377
Joined: Tue Aug 08, 2017 12:37 pm

Re: feather 2040 and oled

by starblast321 on Fri Mar 12, 2021 12:36 pm

I thank you one and all. I have not got the chance to try out the things you fine folks have given me. My info is I am running Adafruit CircuitPython 6.2.0-beta.3 on 2021-03-04; Adafruit Feather RP2040 with rp2040. This weekend I will have the feather hook up with the stemma QT hookups to the SSD1327 OLED. I will have some time this weekend to try it out and let you know what happens. Again thanks for the Info.

starblast321
 
Posts: 14
Joined: Wed Sep 20, 2017 6:57 pm

Re: feather 2040 and oled

by MakerMelissa on Fri Mar 12, 2021 12:39 pm

I think Dan put in a fix last night, so if you go to the circuitpython.org and download the "Absolute Newest", I believe it should have the fix in it.

MakerMelissa
 
Posts: 252
Joined: Wed Jun 05, 2013 2:10 am

Re: feather 2040 and oled

by starblast321 on Fri Mar 12, 2021 5:10 pm

thanks to you and Dan. I will download circuirtpython tomorrow and try it out. Have a good weekend and Pi day.

starblast321
 
Posts: 14
Joined: Wed Sep 20, 2017 6:57 pm

Re: feather 2040 and oled

by zero_ohm on Sun Mar 14, 2021 4:41 pm

Trying to get a rp2040 Feather and a sh1107 after changing line 25 to i2c = busio.I2C(board.SCL, board.SDA) I'm getting total garbage on display

zero_ohm
 
Posts: 29
Joined: Wed Nov 06, 2013 12:31 pm

Re: feather 2040 and oled

by starblast321 on Sun Mar 14, 2021 5:29 pm

I imported busio and set it up with this one i2c = busio.I2C(board.SCL, board.SDA) and have the ssd1327 working now I just need to figure how to use it.

Melissa or Dan might be able to help. I'm no guru at this screen stuff. So fare I do a lot of switch's , LEDs, sensors, relays turning things on and off and lights.

starblast321
 
Posts: 14
Joined: Wed Sep 20, 2017 6:57 pm

Please be positive and constructive with your questions and comments.