Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
spilz87 opened this issue Nov 6, 2022 · 4 comments
Open

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

spilz87 opened this issue Nov 6, 2022 · 4 comments

Comments

@spilz87
Copy link

spilz87 commented Nov 6, 2022

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
Copy link

lathoub commented Dec 3, 2022

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
Copy link

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

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

@burg666
Copy link

burg666 commented Dec 2, 2023

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
Copy link

peter-kutak commented Dec 6, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants