Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By doku-so
#50757
MCUdude wrote:Hi!
I ordered the wrong OLED screen by a mistake. I accidentally bought one with an SPI interface instead if i2c. I got it working with an ordinary Arduino using u8glib, but how can I get this OLED screen to work with the ESP8266? I haven't found any working code yet. I've tried with the Adafruit GFX library, but it requires an OLED screen with the reset pin broken out (mine doesn't). Does anyone know how I can get this screen up and running?

This is the OLED screen I bought


Hi MCUdude, did you figure out how to get your OLED screen working?

I bought a similar OLED display on eBay (a small part of the screen is yellow, rest of the pixels are blue)

http://www.ebay.com/itm/0-96-Blue-SPI-S ... 1020852330

On arrival the display was set to run in SPI mode. (There doesn't seem to be a way to easily switch to I2C, but I've read that SPI can be faster and my MCU is supposed to support Hardware SPI on dedicated pins... So SPI it is!)

There is no CS pin ("Chip Select" or "Slave Select") on the OLED circuit board.

When I bought it, relatively cheap I think ($4.65 at the time), there was no manual or datasheet included. The seller did send me some code samples (with Chinese comments, hah!) but those were targeted at I2C. Then I did some tinkering with Espruino; JavaScript running on the ESP8266. And got some life signs out of the OLED display. Unfortunately limited to some garbage output, I only managed to send some basic commands for contrast, on/off, invert.


Right now I've been getting the best results with a SSD1306 library (C++) written by Daniel Eichhorn.

The SPI library (which uses SPI.h) is initialized in this manner:

SSD1306Spi(uint8_t _rst, uint8_t _dc, uint8_t _cs)

Since my display doesn't have the CS pin, I (naively) put the GPIO number for the 'clock' pin there and it seems to work with demo projects (sketches) that came with the library 8)


But lines of pixels are 'missing'/black, causing the output to look interlaced (like scan lines) :smiley-confuse:

I might have messed it up by using that 'clock' pin... however the display stops working if I leave that pin disconnected, so it is somehow needed.

Perhaps I should try U8glib to see if it leads to better results...


Any ideas?
You do not have the required permissions to view the files attached to this post.