Sandro
Well-known member
Hi all,
In my project, with the amazing Teensy 3.6, I'm using #2 I2C OLED displays 32x128, cause I'm not able to make this guy work:
One display has its original I2C address 3C, the other 3D (obtained by changing the position of a 4.7K resistor on the small board).
I'm facing an issue even with this super simple configuration...
Does anyone know why using in this test code:
after 2 seconds both displays demand to be the only "RIGHT DISPLAY"?
I'm supposing that ONLY .begin and .display functions are "address sensitive"... Is it possible?
Thank you!
In my project, with the amazing Teensy 3.6, I'm using #2 I2C OLED displays 32x128, cause I'm not able to make this guy work:
One display has its original I2C address 3C, the other 3D (obtained by changing the position of a 4.7K resistor on the small board).
I'm facing an issue even with this super simple configuration...
Does anyone know why using in this test code:
Code:
#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_RESET 4
Adafruit_SSD1306 display_R(OLED_RESET); // Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
Adafruit_SSD1306 display_L(OLED_RESET); // Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif
void setup()
{
display_L.begin(SSD1306_SWITCHCAPVCC, 0x3D); // I2C address 0x3D for LEFT display
display_R.begin(SSD1306_SWITCHCAPVCC, 0x3C); // I2C address 0x3C for RIGHT display
display_L.clearDisplay(); // clears Adafruit logo
display_R.clearDisplay(); // clears Adafruit logo
display_L.display(); // empty screen
display_R.display(); // empty screen
display_R.setTextSize(1);
display_R.setTextColor(WHITE);
display_R.setCursor(0, 30);
display_R.print("RIGHT DISPLAY");
display_R.display();
delay(2000);
display_L.display();
}
void loop()
{
}
after 2 seconds both displays demand to be the only "RIGHT DISPLAY"?
I'm supposing that ONLY .begin and .display functions are "address sensitive"... Is it possible?
Thank you!