SSD1306 MicroPython Raspberry Pi Pico I2C

by thedead30 in Circuits > Microcontrollers

8520 Views, 4 Favorites, 0 Comments

SSD1306 MicroPython Raspberry Pi Pico I2C

1612061068626.jpg

Hi All,

I am publishing this because I found all other examples to confusing and not simple enough!

This is just a quick post focusing on the SSD1306 OLED display and how to use it with MicroPython. I will not be focusing on the hardware very much.

I am using the Raspberry Pi Pico with MicroPython. I am using two buttons to make different text appear on the display and flash the onboard led.

I have the push buttons on inputs 15 and 16.

I have the I2C on 4 and 5 because 2 and 4 would not work for some reason.

Above is a quick overview of the wiring.

See file for close up on code

You will need to add a library (package) before this code will work.

To do that use Thonny and go to tools > Package manager > Type in SSD1306

You want the package that looks like the one below and has to github link to:

https://github.com/stlehmann/micropython-ssd1306

Once the package has been installed you should be able to run the code.

thingiverse pic.JPG