sxk
Posts: 4
Joined: Tue Apr 28, 2015 2:19 am

i2c oled woes!

Tue May 05, 2015 1:10 am

Hi

Can any one tell me if it is me or the display is botched and I need to get another?

I bought this one below:
http://www.ebay.com/itm/371269588487?_t ... EBIDX%3AIT

On the pi, with stock raspbian, I changed /etc/modules and added i2c-bcm2708 AND i2c-dev. On the /boot/config.txt I added dtparam=i2c1=on AND dtparam=i2c_arm=on. Rebooted, added i2c-tools and python-smbus.

Connected 3.3v to VCC, GND to GND, SDA to 3 and SCL to 5 and reset to 21. [3,5 being the physical pins and 21 being GPIO21-physical pin 40.]

I am not able to detect anything with i2c-detect -y 1, I do have /dev/i2c-1. However sometimes I get bizarre lighting up of the screen with no clear pattern to it.

Am I doing anything wrong?

If it is just a dodgy screen then I don't mind getting another one from the ebay. However if anyone had success with these can you please post a link to the one you bought here as well. There are so many varieties of these on the bay with differing pin names and counts!

Thanks
sxk

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: i2c oled woes!

Tue May 05, 2015 5:29 am

I'm not familiar with this display, but a quick look at the eBay page and Google search for "SSD1306" tell me it uses SPI (not I2C) and that it is for Arduino's. However, the Adafruit version says "This breakout can be used with either an SPI or I2C interface - selectable by soldering two jumpers on the back." - http://www.adafruit.com/products/326

https://github.com/adafruit/Adafruit_SSD1306

And here we go... https://learn.adafruit.com/ssd1306-oled ... k/overview

https://github.com/adafruit/Adafruit_Python_SSD1306

sxk
Posts: 4
Joined: Tue Apr 28, 2015 2:19 am

Re: i2c oled woes!

Sun May 10, 2015 1:27 pm

Hi ktb

Thanks for reply. I went over it and tried as an spi device. However it does not seem to have the right amount of pins. When I do connect it in spi style it does create a fb1 device. But when I send console or x to the fb1 it neither lights up not any display. However if I connect it in i2c mode screen lights up with random lights but i2c detect does not find any devices.

Please see the image. Any suggestions at all?

Thanks a lot
Attachments
oled.jpg
oled.jpg (9.62 KiB) Viewed 734 times

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3000
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: i2c oled woes!

Wed May 13, 2015 9:31 am

Are you doing anything to make GPIO21 an output and drive it? By default GPIO21 (pin 40) is a input, and may float.

If the reset is active high the pin may need to be driven high then low. If the reset is active low it may need to be driven low then high. I would guess it is an active low reset, so you will need to make the pin an output and set it to 1.

Return to “Interfacing (DSI, CSI, I2C, etc.)”