Multiple OLEDs with Adafruit ssd1306 library

Hello everybody,
I'm trying to drive two SPI OLED displays with the Adafruit ssd1306 library on an Uno.

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

/*#define OLED_MOSI_R   9
#define OLED_CLK_R   10
#define OLED_DC_R    11
#define OLED_CS_R    12
#define OLED_RESET_R 13
Adafruit_SSD1306 display_R(SCREEN_WIDTH, SCREEN_HEIGHT,
  OLED_MOSI_R, OLED_CLK_R, OLED_DC_R, OLED_RESET_R, OLED_CS_R);
*/
#define OLED_MOSI_L   3
#define OLED_CLK_L   2
#define OLED_DC_L    5
#define OLED_CS_L    7
#define OLED_RESET_L 4
Adafruit_SSD1306 display_L(SCREEN_WIDTH, SCREEN_HEIGHT,
  OLED_MOSI_L, OLED_CLK_L, OLED_DC_L, OLED_RESET_L, OLED_CS_L);

void setup() {
  //display_R.begin(SSD1306_SWITCHCAPVCC);
  display_L.begin(SSD1306_SWITCHCAPVCC);
}

void loop() {
  //display_R.clearDisplay();
  display_L.clearDisplay();

  /*display_R.setTextSize(3);
  display_R.setTextColor(SSD1306_WHITE);
  display_R.setCursor(0,0);
  display_R.println(F("R"));

  display_R.display();
 */
  display_L.setTextSize(3);
  display_L.setTextColor(SSD1306_WHITE); 
  display_L.setCursor(0,0);
  display_L.println(F("L"));
  
  display_L.display();
}

If I comment one out, the other works and vice versa, so the wiring is ok. I can't get them to work at the same time.
Any help appreciated (I'm very new to Aruino and C++)

I'm trying to drive two SPI OLED displays with the Adafruit ssd1306 library on an Uno.

#1 128x64 needs 1024 bytes for a buffer.
#2 128x64 needs 1024 bytes for a buffer.

Your Uno has only got 2048 bytes of SRAM.

If you want to have graphics on both, use U8g2lib with "small buffer" 1 constructors.

U8g2 will do everything that Adafruit_SSD1306 does but with different syntax.

David.

Thanks! I only want text at various sizes. I tried U8g2lib and it worked but I found it harder to use, I guess I'll have to try harder...

There are several text-only SSD1306 libraries. They don't need to use a buffer because the text always overwrites. And probably has to remain within page boundaries.

Look for Larry Bank.