angr_mgmt
Posts: 1
Joined: Fri Aug 12, 2016 3:00 pm

SSD1306 problems on PI Zero

Fri Aug 12, 2016 3:20 pm

Hi,

i was trying pretty hard to get the ssd1306 oled display working on my raspberry, but i can't really figure it out, because there seems to be a problem with the actual bus communication that i'm unable to debug unfortunately.

The display board is that one: http://www.ebay.de/itm/Blue-0-96-IIC-I2 ... 1297157720
which should be able to communicate using 4-wire spi by default the back side states that some resistors need to be added for i2c or 3 wire spi. A possible point of failure might be that you have to remove some other resistors to make 4-wire spi available - but i don't really know and those sellers can't provide much info.

I used the following pinout:

CS->#24
CLK->#23
D1=Mosi->#19
RST->#8
DC->#10
VCC->#1
GND->#6

And i sticked to the Adafruit tutorial thus using the Adafruit-Python-SSD1306 code. Those examples seem to fail with the following messages:

pi@raspberrypi:~/Adafruit_Python_SSD1306/examples $ python shapes.py
Traceback (most recent call last):
File "shapes.py", line 70, in <module>
disp.begin()
File "build/bdist.linux-armv6l/egg/Adafruit_SSD1306/SSD1306.py", line 147, in begin
File "build/bdist.linux-armv6l/egg/Adafruit_SSD1306/SSD1306.py", line 289, in _initialize
File "build/bdist.linux-armv6l/egg/Adafruit_SSD1306/SSD1306.py", line 128, in command
File "build/bdist.linux-armv6l/egg/Adafruit_GPIO/I2C.py", line 114, in write8
File "build/bdist.linux-armv6l/egg/Adafruit_PureIO/smbus.py", line 236, in write_byte_data
IOError: [Errno 5] Input/output error

The SPI and I2C bus was properly enabled using the raspi-config tool and show up:
pi@raspberrypi:~/Adafruit_Python_SSD1306/examples $ ls /dev/ | grep spi
spidev0.0
spidev0.1
pi@raspberrypi:~/Adafruit_Python_SSD1306/examples $ ls /dev/ | grep i2c
i2c-1

I've got the python i2c and smbus libs installed.

But the display stays black all the time, the code fails, and after some days of trying everything google threw on me, i kinda got desperate and thought that i might have success with asking for help here.

So is anybody running the same display circuit board (as it could be a problem with that board?), or has a different hint on what else to try: you're very very welcome!

Thank you!

bowen73
Posts: 25
Joined: Mon Jan 16, 2017 2:10 pm

Re: SSD1306 problems on PI Zero

Mon Jul 31, 2017 3:41 pm

Hi, did you get anywhere with this?

ive got the same with a pi zero and am fairly new to it but can get it come on. the guy i got the screen from off amazon sent me this: http://raspberrypi4u.blogspot.co.uk/201 ... d-i2c.html but it doesnt really help and still cant get the screen to come or do anything

thanks
Many years in IT Management but now an old dog trying new tricks with Pi's and Python! :?

User avatar
bitbank
Posts: 253
Joined: Sat Nov 07, 2015 8:01 am
Location: Sarasota, Florida
Contact: Website

Re: SSD1306 problems on PI Zero

Mon Jul 31, 2017 5:25 pm

angr_mgmt wrote:
Fri Aug 12, 2016 3:20 pm
Hi,

i was trying pretty hard to get the ssd1306 oled display working on my raspberry, but i can't really figure it out, because there seems to be a problem with the actual bus communication that i'm unable to debug unfortunately.

The display board is that one: http://www.ebay.de/itm/Blue-0-96-IIC-I2 ... 1297157720
which should be able to communicate using 4-wire spi by default the back side states that some resistors need to be added for i2c or 3 wire spi. A possible point of failure might be that you have to remove some other resistors to make 4-wire spi available - but i don't really know and those sellers can't provide much info.

I used the following pinout:

CS->#24
CLK->#23
D1=Mosi->#19
RST->#8
DC->#10
VCC->#1
GND->#6

And i sticked to the Adafruit tutorial thus using the Adafruit-Python-SSD1306 code. Those examples seem to fail with the following messages:

pi@raspberrypi:~/Adafruit_Python_SSD1306/examples $ python shapes.py
Traceback (most recent call last):
File "shapes.py", line 70, in <module>
disp.begin()
File "build/bdist.linux-armv6l/egg/Adafruit_SSD1306/SSD1306.py", line 147, in begin
File "build/bdist.linux-armv6l/egg/Adafruit_SSD1306/SSD1306.py", line 289, in _initialize
File "build/bdist.linux-armv6l/egg/Adafruit_SSD1306/SSD1306.py", line 128, in command
File "build/bdist.linux-armv6l/egg/Adafruit_GPIO/I2C.py", line 114, in write8
File "build/bdist.linux-armv6l/egg/Adafruit_PureIO/smbus.py", line 236, in write_byte_data
IOError: [Errno 5] Input/output error

The SPI and I2C bus was properly enabled using the raspi-config tool and show up:
pi@raspberrypi:~/Adafruit_Python_SSD1306/examples $ ls /dev/ | grep spi
spidev0.0
spidev0.1
pi@raspberrypi:~/Adafruit_Python_SSD1306/examples $ ls /dev/ | grep i2c
i2c-1

I've got the python i2c and smbus libs installed.

But the display stays black all the time, the code fails, and after some days of trying everything google threw on me, i kinda got desperate and thought that i might have success with asking for help here.

So is anybody running the same display circuit board (as it could be a problem with that board?), or has a different hint on what else to try: you're very very welcome!

Thank you!
You've got an I2C display (4-wire), yet you're mentioning SPI and pinouts for an SPI device. I've got a clone of that display and you should connect it to the RPi Zero I2C bus as follows:

OLED ----- RPi Zero
Vcc -> pin 1 (3.3v)
GND -> pin 6 (GND)
SDA -> pin 3 (SDA)
SCL -> pin 5 (SCL)

You can use the Adafruit code to test it or if you prefer a simple C program, you can use my code:

https://github.com/bitbank2/oled_96
The fastest code is none at all :)

drjam
Posts: 11
Joined: Sun Nov 13, 2016 7:20 am
Location: Austraya

Re: SSD1306 problems on PI Zero

Sun Sep 17, 2017 10:32 am

i am looking for answers too.
its really put a damper on my enthusiasm to make and deploy raspberry solutions sadly...
ive tried at least 10 different installs, adafruits, rmhull, alien-DNA-buttprobes everything.... i hate when people change code bases without keeping the old stuff available. :evil: :|
Couple of pi 3's, a pi 2 and an assortment of hardware.
your move brain.....your move

User avatar
bitbank
Posts: 253
Joined: Sat Nov 07, 2015 8:01 am
Location: Sarasota, Florida
Contact: Website

Re: SSD1306 problems on PI Zero

Sun Sep 17, 2017 10:29 pm

drjam wrote:
Sun Sep 17, 2017 10:32 am
i am looking for answers too.
its really put a damper on my enthusiasm to make and deploy raspberry solutions sadly...
ive tried at least 10 different installs, adafruits, rmhull, alien-DNA-buttprobes everything.... i hate when people change code bases without keeping the old stuff available. :evil: :|
What's your question and what code base changes are you talking about?
The fastest code is none at all :)

drjam
Posts: 11
Joined: Sun Nov 13, 2016 7:20 am
Location: Austraya

Re: SSD1306 problems on PI Zero

Sun Sep 17, 2017 11:07 pm

Wow thanks for the fast reply!
I went to bed after finding out my issue:

Multiple library installs,updates, removes and much yelling on a single pi zero and no oled display.

I started from a fresh wheezy Raspbian lite, and noticed one other SMALL issue.... my ground wire was connected to gpio 4, not the ground pin next to it.



O....m.....g....
Couple of pi 3's, a pi 2 and an assortment of hardware.
your move brain.....your move

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: SSD1306 problems on PI Zero

Mon Sep 18, 2017 9:31 pm

drjam wrote:
Sun Sep 17, 2017 11:07 pm
I started from a fresh wheezy Raspbian lite
That's impossible... Wheezy is old and stale and smelly and has been for a long time.

drjam
Posts: 11
Joined: Sun Nov 13, 2016 7:20 am
Location: Austraya

Re: SSD1306 problems on PI Zero

Tue Sep 19, 2017 12:40 am

Lol. For some reason j thought there was a new raspian after Jessie. STRETCH is it's name
...hahahahha ok
Couple of pi 3's, a pi 2 and an assortment of hardware.
your move brain.....your move

Return to “Troubleshooting”