adafruit / Adafruit_SSD1306

Arduino library for SSD1306 monochrome 128x64 and 128x32 OLEDs
http://www.adafruit.com/category/63_98
Other
1.81k stars 984 forks source link

Update for RP2040 #240

Closed caternuson closed 2 years ago

caternuson commented 2 years ago

For #239.

Tested with Feather RP2040 and PID 2900 OLED FeatherWing using library example sketch OLED_featherwing.ino.

nschurando commented 2 years ago

Hi. Somehow, this commit breaks things for me. The || defined(ARDUINO_ARCH_RP2040) tries to include pgmspace.h which doesn't seem to exist. Removing it fixes the compilation. Here's a the detailed list of the versions included:

PLATFORM: Raspberry Pi RP2040 (1.6.0) > Raspberry Pi Pico
HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
PACKAGES:
 - framework-arduino-mbed @ 3.0.1
 - tool-rp2040tools @ 1.0.2
 - toolchain-gccarmnoneeabi @ 1.90201.191206 (9.2.1)
|-- Adafruit BusIO @ 1.11.6
|-- Adafruit GFX Library @ 1.11.1
|-- Adafruit NeoPixel @ 1.10.4
|-- Adafruit SSD1306 @ 2.5.3
ggerganov commented 2 years ago

It breaks build for me as well - using Arduino Nano RP2040 Connect:

.../Arduino/libraries/Adafruit_SSD1306/Adafruit_SSD1306.cpp:42:10: fatal error: pgmspace.h: No such file or directory
 #include <pgmspace.h>
          ^~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Arduino Nano RP2040 Connect.
caternuson commented 2 years ago

@nschurando @ggerganov What RP2040 Board Support Package are you using?

ggerganov commented 2 years ago

I am using Arduino Mbed OS Nano Boards

CeruleanMars commented 1 year ago

I have the same issue as @nschurando and @ggerganov. I'm using the Arduino Nano RP2040 Connect with the Arduino Mbed OS Nano Boards package in Arduino IDE 1.8.13. It won't compile with #elif defined(ESP8266) || defined(ESP32) || defined(ARDUINO_ARCH_RP2040) on line 40/41 in the CPP file. Changing that line to #elif defined(ESP8266) || defined(ESP32) fixes the issue.