Skip to content

Adafruit SSD1306 Library not working with arduino-pico #708

Answered by dhalbert
1PY1 asked this question in Q&A
Discussion options

You must be logged in to vote

The relevant code from the latest version of the library
is

#ifdef __AVR__
#include <avr/pgmspace.h>
#elif defined(ESP8266) || defined(ESP32) || defined(ARDUINO_ARCH_RP2040)
#include <pgmspace.h>
#else
#define pgm_read_byte(addr)                                                    \
  (*(const unsigned char *)(addr)) ///< PROGMEM workaround for non-AVR
#endif

Make sure your Adafruit SSD1306 library is up to date, at least 2.5.2, and preferably 2.5.6, the latest as of this writing. We (Adafruit) added the defined(ARDUINO_ARCH_RP2040) about 4 months ago to fix this problem:
https://forums.adafruit.com/viewtopic.php?f=57&t=189849
adafruit/Adafruit_SSD1306#239
adafruit/Adafruit_SSD1306#240

tag…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@1PY1
Comment options

Answer selected by 1PY1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants