Once it was reading out some data I decided to hook up the OLED screen on top, using jumper wires on the extended header.
As usual the simple thought turns into a few hours of trying to figure out how everything is even wired. Thanks to this random person for figuring out the correct wiring for a Raspberry Pi, if you ever see this.
Here's the OLED wiring from the above:
oled (GND/G) — Pi ( Pin 6 Gnd) oled (Vin/+) — Pi (Pin 1 3.3v) oled (MOSI/SI) — Pi (Pin 19) GPIO 10 (MOSI) oled (SCK/CL) — Pi (Pin 23) GPIO 11 (SCLK)) oled (DC/DC) — Pi (Pin 16) GPIO 23 oled (Reset/R) — Pi (Pin 18) GPIO 24 oled (OLEDCS/OC) — Pin 24 (GPIO 8 CE0)
You can get a good look at the Pin layout of a Pi here.
The pins on the OLED should be shown on the PCB of the board itself.
Once wired up it was OLED code time.
First I hit up a tutorial here. < This one is the most important as it guides you through the installation of the necessary software.
Then looked at some code from here. And also this handy stuff here.
I’d suggest the tutorial first followed by looking at the second links examples, these will get you setup writing stuff to the screen successfully. The third link has some further cool stuff for drawing shapes to the screen.
On my first attempts with the above I had some issues getting the screen to work, when trying to run text examples I ended up with a garbled screen – a bad feeling when you think you’ve busted a new piece of hardware in the first five minutes.
However I eventually discovered how to display a picture of a cat. With further trial and error I was able to display text – I combined this with the code for reading the Enviro pHat data and BEHOLD:
At this point I was excited – I moved onto making the text tidier and added some spacers to get the correct distance from the glasses + the lens:
I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.