Open Rishabh028 opened 3 months ago
Hey so I had a similar problem and there isn't really a straight forward fix if you want to update the display at once with pixel data AFAIK. But I got around the issue with a combination of tft.startWrite();
, tft.dmaWait();
, and tft.endWrite();
It's unclear what the actual issue is here. The error message is generally explaining what is happening:
class Adafruit_SSD1351' has no member named 'display'
Why is the call to display()
being attempted? It doesn't exist.
So what should i use to display the serial monitor output of arduino ide in 1.5inch oled spi display ?
Hey so I had a similar problem and there isn't really a straight forward fix if you want to update the display at once with pixel data AFAIK. But I got around the issue with a combination of
tft.startWrite();
,tft.dmaWait();
, andtft.endWrite();
Can you show an example? I don't quite understand how this can replace this function.
Can someone provide an example sketch code that demonstrates this issue?
Adafruit_SSD1351 display = Adafruit_SSD1351(SCREEN_WIDTH, SCREEN_HEIGHT, &SPI, OLED_DC, OLED_RESET, OLED_CS);
void setup() { Serial.begin(9600); // initialize serial communication at 9600 baud
display.begin(0x3D); // Initialize the OLED display display.fillScreen(0x0000); // Fill the screen with black delay(1000); }
void loop() { Serial.println("Hello, world!"); // print "Hello, world!" to the serial monitor delay(1000); // wait for 1 second
// Read from Serial Monitor if (Serial.available() > 0) { String serialData = Serial.readString();
// Display on the OLED
display.fillScreen(0x0000); // Clear the display
display.setCursor(0, 0);
display.setTextSize(1);
display.setTextColor(0xFFFF); // White color
display.println(serialData);
display.display(); // Update the display
}
Serial.flush(); // Clear the serial buffer delay(100); // Adjust delay as needed }
I am trying to display the output of serial monitor in a 1.5 oled display but when i am using display.display( ); it is showing error C:\Users\Rishabh\AppData\Local\Temp.arduinoIDE-unsaved202425-13096-sx2s2m.799bi\sketch_mar5a\sketch_mar5a.ino: In function 'void loop()': C:\Users\Rishabh\AppData\Local\Temp.arduinoIDE-unsaved202425-13096-sx2s2m.799bi\sketch_mar5a\sketch_mar5a.ino:36:13: error: 'class Adafruit_SSD1351' has no member named 'display' display.display(); // Update the display ^
~~exit status 1
Compilation error: 'class Adafruit_SSD1351' has no member named 'display'