This project could be much more efficient, but this is a one off project, and I've gotten rusty with C
You'll need libu8g2arm already compiled on your Raspberry Pi,
You'll also need the g++ package, which can be installed with $ sudo apt install g++
To compile the project, be in the same directory as the bad apple files, $ cc main.c -o program -l:libu8g2arm.a
,
Then to run $ ./program
Depending on which 128x64 LCD display you have, you'll have to shift 3.3V logic to 5V logic (Something like this), or it WILL destory your Raspberry Pi.
GND - GND
LCD Power -
VCC - +5V
LCD Power +
E - SCLK (GPIO 11)
Serial Clock (See Warning)
R/W - MOSI (GPIO 10)
Master Out Slave In (See Warning)
RS(unconnected)
Read-Select (see note 1)
PSB - GND
Enables SPI mode on display
BLA - +5V
Blacklight +
BLK - GND
Blacklight -
Note 1: RS
is Chip Select in SPI mode on ST7920, but CE0
/CE1
are inverted to the spec of ST7920, So leave this disconnected or you'll have no display output