Hello there. My name is Grhmhome and I've been working on a fan handheld for Pico 8, using a Pi Zero W. I've been working on this project for roughly a week now. I'm proficient with Cad, 3D printing, and I've been learning soldering. I wanted to make a handheld for the Pico 8 with the correct aspect ratio screen and I finally found the perfect screen for my project. This post is a quick tutorial on how to get the Waveshare 128x128 RGB OLED display module to work properly. This took me all of yesterday to get to work properly as I had to troubleshoot and do more troubleshooting.
Where to find this screen?
I used the latest version of RetroPie for this project.
Step 1. Wiring the screen. The pins I used are as follows. The connector that comes with the display should be color coded.
VCC (Power +): Any 3.3V GND (Power -): Any GND DIN: GPIO 10 MOSI CLK: GPIO 11 CLK CS: GPIO 8 CE0 DC: GPIO 25 RST: GPIO 24
If you need help on figuring which pin are which, I used this handy site: https://pinout.xyz/
Type sudo raspi-config and enable SPI interfaces. You will also want to configure your system to autologin as Pi and boot into the terminal. If you are using RetroPie like me, you will also have to go into the RetroPie settings and make sure your not booting directly into Emulationstation, but into the terminal and have it autologin as Pi.
Step 3. Install wiring pi and cmake. If your OS doesn't have git, install that too.
sudo apt-get update sudo apt install cmake sudo apt install wiringpi sudo apt install git
Step 5. Clone the git repo git clone https://github.com/juj/fbcp-ili9341.git
Step 6. Edit some of the files. You will need to edit config.h and change //#define UPDATE_FRAMES_WITHOUT_DIFFING
to #define UPDATE_FRAMES_WITHOUT_DIFFING
Also you will want to edit ssd1351.cpp and change the values on line 35 from 97 to 127.
On ssd1351.h you will want to change #define DISPLAY_NATIVE_HEIGHT 96 to 128 on line 21.
Step 7. Once you finish doing that copy the following commands into the terminal.
mkdir build cd build cmake -DSSD1351=ON -DGPIO_TFT_DATA_CONTROL=25 -DGPIO_TFT_RESET_PIN=24 -DSPI_BUS_CLOCK_DIVISOR=20 -DSTATISTICS=0 .. make -j
Make sure the display is working by typing in sudo ./fbcp-ili9341
If the display is working correctly, continue on. If it is not working, you will have to make sure the screen is connected to the correct GPIO pins.
Step 8. Next, you will want to make sure the display driver will autostart when you turn on your Pi Zero. Edit /etc/rc.local and add the following above the line that says exit 0 sudo /home/pi/fbcp-ili9341/build/fbcp-ili9341 &
After that, you will want to edit /boot/config.txt and add the following
hdmi_group=2 hdmi_mode=87 hdmi_cvt=128 128 60 hdmi_force_hotplug=1
If you want to autostart Pico 8, which I'm assuming you are wanting, add another line in /etc/rc.local above exit 0. Change the path accordingly wherever you decided to put Pico 8.
sudo /home/pi/pico-8/pico8 -splore &
Now, when you reboot your system, it should boot directly to Pico 8 every time using the display. I hope this tutorial was helpful. If you have any questions, or if I'm missing anything, feel free to leave a message.
[Please log in to post a comment]