For this weeks assignment, I wanted to connect two OLEDs via I2C to my board. I2C is a communication protocol where two or devices share data pins, but have different addresses which allows the processor to individually communicate with them over the same wires.

display circuit

My board already has hardware-based I2C, so after consulting the datasheet I determined that I needed to use pins 16 and 17 for SDA and SCL. Before I could hook up the boards, I needed to do one more step, which was to flip one of the resistors on the back of the display to change its address.

address resistor

After flipping the resistor from 0x7B to 0x7A, and making a few more split-end wires, I was ready to wire everything up.

display circuit

Using Lingdong's guide, I figured out how to address both displays and got them working!

code

Linked files:

OLED test code