Week 9: Output Devices

Created
Tags

This week, I decided to add on to my previous week’s functionality of measuring positional data from a joystick and combining it with an OLED display.

I wanted to change the display based on the direction the joystick is being pushed in. Initial ideas are maybe controlling the smile/frown on an emoji using the joystick position.

Interfacing the Display

I am using a GME12864 OLED display. I chose OLED because I hadn’t worked with one during my past life as an electronics engineering undergrad.

Again, I began getting the “fatal error” that I got a few times the previous week. Last week, I was able to resolve this by holding down the boot button before connecting the controller. I tried multiple times to do the same thing I did to resolve this last week, but no luck.

I was unable to flash the code to the XIAO ESP32C3. After a bit of googling, I learned that this is a failure mode with XIAO fairly often, and might be a manufacturing defect. Since it was a Tuesday night and I wasn’t at the makerspace, I didn’t have enough time to mill a new board with a fresh ESP32C3. 😟

New board

with my new board, i decided to add headers for the xiao instead of directly soldering it so that if i faced any such issues i wouldnt have to remake the entire board.

I was then able to connect the joystick and OLED display to my new board. Since the SEAS makerspace was out of ESP32, I instead used an RP2040. The Xiaos consistent pinout and wiring diagram meant this was easy peasy with no changes needed!

To start off, I am rendering the joystick position using the U8G2 graphics library

Final Board + Result

I designed a Xiao gaming board with the joystick as an input and a screen as output. I made one mistake with my design - I forgot to account for the orientation of the joystick module once its plugged into the custom board. This resulted in a device that had its screen on one side and joystick inverted on the other side.

It looked kinda funny and was definitely unusable, but I learned a lesson here.