Comments: Qwiic Micro OLED Hookup Guide
Looking for answers to technical questions?
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
If you've found an issue with this tutorial content, please send us your feedback!
I am now talking to the OLED from a C/C++ program on the Raspberry Pi 3 B+.
There is no data register, so you can skip that part of the initialization and just do the rest. Despite what the data sheet says, the OLED is 64x48, as stated in the product description. The DRAM buffer appears to be 128x64 (8 pages by 128 columns). The DRAM for the display starts on page 2 and column 32.
Here are the key bits of code:
I got mine to work with the Qwiic Hat and a Raspberry Pi 3 B+ using the luma.oled libraries. I followed this tutorial for basic information: http://codelectron.com/setup-oled-display-raspberry-pi-python/
Just be aware that the display in the tutorial is a different i2c address and size. You'll need to modify the codelectron examples a little bit to run them on the Qwiic Micro OLED.
I also installed the luma.examples from here https://github.com/rm-hull/luma.examples Using the command $ git clone https://github.com/rm-hull/luma.examples.git
Those examples can take parameters for the dimensions and i2c address. Note that the params are double-dashed. So for example to run the analog clock example, I typed: $ cd luma.examples $ python clock.py --width 64 --height 48 --i2c-adress 0x03D
and it worked as expected.
Good luck to you!
Just to follow up, here's a basic hello_world.py example using the luma.oled library to run the Qwiic Micro OLED on a Raspberry Pi 3:
I got the Qwiic Micro OLED with a Raspberry Pi bundle, but the sample code here is for Arduino. Is there's a corresponding library and sample code for the Pi? I've read up on the wiringPi library and the SSD1306 data sheet, but I'm not having any luck getting it to work.