adapting code

Hello i have a rather nooby and specific question but how can i adapt this code

to work with this display

http://www.ebay.com/itm/191785893008?ul_noapp=true

it apears in the comments that somone got a similar display to work

jjarduinogamer:
it apears in the comments that somone got a similar display to work

Wouldn't it be easier to contact the "someone" ?

One display appears to be I2C and the other SPI... start by figuring out the changes in the code and libraries for those differences, then re-evaluate and go from there.

Best Regards

The adafruit library supports both SPI and i2c so "porting" should not be difficult if the display is compatible with the ssd1306 library.
I say "compatible" because some of the displays have i2c issues that require some work arounds to get working due to the way they handle 5v vs 3v signals. (I'm not just talking about voltage level shifting issues)
Also, I think some of the displays are offset in the horizontal direction. i.e. X pixel zero is not the left most pixel because the pixels are rotated a bit in the X plane.

The biggest thing I'd be concerned about is the difference in interface speed. SPI is significantly faster than i2c.
The adafruit library uses a full frame buffer and does not do anything very smart to update the display so to update the display, it slams out every single pixel from the frame buffer vs updating each pixel as they are modified.
If the animation really needs the faster speed of SPI to work correctly, then you will not be able to work around it.

But given you are buying the display from ebay, why not buy a SSD1306 that has a spi interface instead of i2c? That way it should just drop in and work "as is".

--- bill