-
Notifications
You must be signed in to change notification settings - Fork 1k
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
SSD1309 SPI connection is causing erratic display #2411
Comments
You need to use "U8G2_SSD1309_128X64_NONAME2_F_4W_SW_SPI " |
not sure how I can do this. What is the display output if you just repace the constructor with the initially provided code? |
In your code you have used sendBuffer() to update the display. However, sendBuffer() requires the "F" constructor. In your code you have instead used the "1" constructor, which is wrong and typically it leads to a blank 8-pixel height row on the display. Such a blank 8-pixel height row seems to be there in the lower part of your both of your pictures. Are you really sure you have tested your code with the "F" constructor? |
Yeah,I tested with F constructor |
hmm maybe there is something wrong with the DC line... |
plz help, how to solve this issue ! |
Not sure how I can do this from my end. |
I've successfully flashed my code for the SSD1309 display, but it's showing irregularities in its output, as depicted in the provided image.
I'm using ESP32-S3-MINI-1
#include <Arduino.h>
#include <U8g2lib.h>
#include <SPI.h>
#define OLED_SCL 13 // Define the SCL pin
#define MOSI_PIN 11 // Define the MOSI pin
#define OLED_CS 10 // Define the CS pin
#define OLED_DC 9 // Define the DC pin
#define OLED_RESET 8 // Define the RESET pin
U8G2_SSD1309_128X64_NONAME2_1_4W_SW_SPI u8g2(U8G2_R0,OLED_SCL, MOSI_PIN,/* cs=/ OLED_CS, / dc=/ OLED_DC, / reset=*/ OLED_RESET);
void setup() {
u8g2.begin();
u8g2.setFont(u8g2_font_logisoso28_tf); // Set font size to a suitable size
u8g2.clearBuffer();
}
void loop() {
u8g2.drawStr(5, 28, "Hi");
u8g2.sendBuffer();
delay(3000);
u8g2.clearBuffer();
u8g2.sendBuffer();
delay(1000);
}
How can I fix it?
Thanks.
The text was updated successfully, but these errors were encountered: