adafruit / Adafruit_SSD1306

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

not able to run ESP32 and SSD1306 128x64 i2c #250

Open spilz87 opened 1 year ago

spilz87 commented 1 year ago

I'm using and ESP32 and a screen SSD1306 128x64 with i2c wire : SDA -> 21 / SCK -> 22

the board works well with an other SSD1306 library, but I would like to be able to use this one to be able to use adafruit GFX then.

i tryed the exemple ssd1306_128x64_i2c.ino

but nothing happend on the screen :(

i tried adding at setup() Wire.setPins(21,22); but didn't solve it.

has anyone an exemple with ESP32 and this screen ? (sorry if it was already solved, but i didn't fine it in issues)

thanks for your help in advance

regard

lathoub commented 1 year ago

I run it with an ESP32 without a problem.

#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 -1       // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
...
// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS))
{
    // fail
}

I set the board to DOIT ESP32 DEVKIT v1 Arduino IDE 2.0.2

peter-kutak commented 9 months ago

I use Wire.begin() in setup() with success

void setup() { Serial.begin(9600); USB.begin(); Wire.begin(35, 33); display.begin(...

burg666 commented 7 months ago

I use Wire.begin() in setup() with success

void setup() { Serial.begin(9600); USB.begin(); Wire.begin(35, 33); display.begin(...

Any example ??

peter-kutak commented 7 months ago

in attachment

On Saturday 02 December 2023 03:27:53 AM (+01:00), burg666 wrote:

I use Wire.begin() in setup() with success

void setup() { Serial.begin(9600); USB.begin(); Wire.begin(35, 33); display.begin(...

Any example ??

— Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit_SSD1306/issues/250#issuecomment-1837000070 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDMMXLPQQUN7QOI765T5A3YHKG2TAVCNFSM6AAAAAARYQFJB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGAYDAMBXGA . You are receiving this because you commented.