This actually is not a problem of pgm_read_byte
which only produces a warning (would still build).
The actual error revolves around the redeclaration of int random(int)
.
Just remove/rename the function and it will build.
A forum search would have given you this (which also applies to I2C, since it’s basically the same sample, just different interface)
Adafruit SSD1306 [SOLVED]