#RaspberryPi Pico I2C SSD1306 OLED display updated

Thanks to a pull request from Joe Jackson, an example bitmap display is given for my Pico SSD1306 OLED 128×64 and 128×32 I2C display (see here).

My code isn’t perfect, but at least it works. You can do bitmaps and text, which is I think is really useful.

About mcturra2000

Computer programmer living in Scotland.
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to #RaspberryPi Pico I2C SSD1306 OLED display updated

  1. edipoasgmailcom says:

    Very nice!
    Can you say f it is a difficult port to work with SPI? Or if you know any other library wich does this. Thanks!

    • mcturra2000 says:

      Hopefully porting it to SPI shouldn’t be “too bad”. AFAIK the displays work in the same way, That’s where the tricky bit is, which has already been done. One then just needs to replace the communication interface. So, “in theory”, one would just need to tweak the functions send_data(0 and init_i2c() to work with SPI instead of I2C.

      There’s a couple of other OLED libraries listed on the Pi forums:

      The following appears to SPI-compatible:
      It has a lot of Arduino-isms in it, so I suspect that it will not work with the Pico out of the box.

      You might want to try his code first, and see how you get on. If not, you might want to take a look at my code instead. There’s a lot less of it, and like I say, there’s only 2 places where the code needs to be converted (fingers crossed).

      • edipoasgmailcom says:

        Thank you so much for your response.
        In the meantime I managed to put my hands ond a I2C display, and your code worked flawless!!
        I’m so happy to able to be able draw pixels. That’s all I need for now, so racking brains with SPI for a while.
        I still thank you for the code and the useful links.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s