CodeX
Published in

CodeX

FaceBot 2.0 — Using 2.42" OLEDs over I2C with MicroPython

Our new generation of STEM teaching robots with big displays are easier to connect and more powerful.

2.42" OLED display is driven by a 4-wire I2C interface with one extra wire for RESET. Photo by the author.

Background of the FaceBot 1.0

Sample face structures for nine emotions. The image is taken from the paper Emotive Response to a Hybrid-Face Robot and Translation to Consumer Social Robots. Our “happy” robots tend to drive forward without collisions. Robots about to collide with a wall might register a “surprise” face.

Goals for FaceBot 2.0

Raspberry Pi Pico and the Cytron Maker Pi RP2040

This photo is Cytron Maker Pi RP2040 with seven Grove connectors without a display. This robot is the foundation of our FaceBot. Our challenge was connecting the SPI displays took up three complete connectors and caused unused connections.

Connecting SPI to the Cytron Boards Grove Connectors

Failed Ventures into I2C Conversion

A Little Help from A Friend

The Solution: I2C + 1

Sample MicroPython code to startup the OLED display. Lines 6–9 are used to reset the display before it wakes up to receive the I2C data stream. Image by the author.

Details on how to move the resistors on the rear of the board

The three changes we made to the DIYMORE OLED display to convert it from SPI to I2C. This image was taken from the video provided by retrofriends on YouTube.
Video showing how to change the jumper settings to convert an OLED from the SPI factory settings to use the I2C interface. Thanks to the YouTube channel retrofriends for providing the instructions.

Closing with Gratitude for Friends

More to Explore

--

--

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dan McCreary

Distinguished Engineer that loves knowledge graphs, AI, and Systems Thinking. Fan of STEM, microcontrollers, robotics, PKGs, and the AI Racing League.