Lab: OLED Screen Display using I2C

Make OLED screen display potentiometer reading

I set up the breadboard and code as instructed on the by the lab. I was able to see in the Serial Monitor that potentiometer were reading relatively reliably by printing them to the Serial Monitor. After about 3 seconds, I got a message that "Display is good to go".

Screen Shot 2021-11-02 at 19.32.13.png

Despite this, the display was not showing anything. I tried to see what would happen if I turned off the Serial Monitor — was this a similar situation to the p5 serial monitor set-up? However, shutting it down did not help.

I read through the Adafruit library to see if there was anything that I was missing about it. It didn't seem like it.

I went back to see whether I had plugged the wires into the right ports. It turned out that the SDA and SCL wires were one pin off from where they belonged. When I plugged them into the correct pins, the screen lit up. Classic!

lab1_pot_oledScreen_480p.mov

Change fonts on OLED display

Next, I went to go change the font of the OLED display. I uploaded a Free Sans font and here is what it looked like on the display:

IMG_1304.HEIC

Graphics

I graphed the reading from the potentiometer:

IMG_1305.HEIC

Displaying QR codes

I wasn't able to display a QR code with this code. I tried adjusting the screen size and other elements but wasn't able to figure it out. I'm not totally clear from where the screen is getting pixel data.

Then I read further in the lab and saw that there was other code available for the Arduino, seen here. I also followed the instructions for typing in text in the Serial Monitor.