harshmittal2210 / youtubeProjects

Compilation of different softwares, codes, features I will showcase on my YouTube Channel
http://www.harshmittal.com/youtubeProjects
2 stars 1 forks source link

Issue interacing SSD1315 I2C OLED Display #5

Open maximagination1 opened 1 year ago

maximagination1 commented 1 year ago

Hi there. Could anyone please help me to make this code work with a "Grove SSD1315" 4-pin display? Nothing is showing up on the OLED display after uploading the code. Thanks in advance.

harshmittal2210 commented 1 year ago

Hi @maximagination1 ,

Was busy with some work so could not spend a lot of time researching it.

Here are some of the links that I found helpful:

https://forum.arduino.cc/t/ssd1315/695280/19

https://wiki.seeedstudio.com/Grove-OLED-Display-0.96-SSD1315/#software

From what I understand you might have to go through the documentation to see the exact pins you will have to initialize in order to make it work. And also you will have to modify the function calls.

eg:

u8g2 way of printing a string:

u8g2.clearBuffer();                   // clear the internal memory    
u8g2.setFont(u8g2_font_ncenB08_tr);   // choose a suitable font    
u8g2.drawStr(0,10,"Hello World!");    // write something to the internal memory   
u8g2.sendBuffer();                    // transfer internal memory to the display    
delay(1000); 

Adafruit_SSD1306 method:

display.clearDisplay();
display.setTextSize(2);             // Draw 2X-scale text
display.setTextColor(SSD1306_WHITE);
display.setCursor(10,5);
display.println("Dino Game");
display.display();
maximagination1 commented 1 year ago

Hi Harsh,

Thanks for putting in the research into this, I appreciate it!

Although I started finding a way to recreate this Dino Game on an OLED display in the beginning, I didn't wait and have already moved onto doing it all on a 16x2 LCD instead.

I'll keep your tip in mind for when I deal with these displays in the future. Thanks anyway!

Have a good weekend.

Best Regards, Max

On Thu, Feb 9, 2023, 4:03 PM Harsh Mittal @.***> wrote:

Hi @maximagination1 https://github.com/maximagination1 ,

Was busy with some work so could not spend a lot of time researching it.

Here are some of the links that I found helpful:

https://forum.arduino.cc/t/ssd1315/695280/19

https://wiki.seeedstudio.com/Grove-OLED-Display-0.96-SSD1315/#software

From what I understand you might have to go through the documentation to see the exact pins you will have to initialize in order to make it work. And also you will have to modify the function calls.

eg:

u8g2 way of printing a string:

u8g2.clearBuffer(); // clear the internal memory u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font u8g2.drawStr(0,10,"Hello World!"); // write something to the internal memory u8g2.sendBuffer(); // transfer internal memory to the display delay(1000);

Adafruit_SSD1306 method:

display.clearDisplay(); display.setTextSize(2); // Draw 2X-scale text display.setTextColor(SSD1306_WHITE); display.setCursor(10,5); display.println("Dino Game"); display.display();

— Reply to this email directly, view it on GitHub https://github.com/harshmittal2210/youtubeProjects/issues/5#issuecomment-1424740252, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATTARJE3DXDGELFDCYEIK23WWVEQNANCNFSM6AAAAAAURGQT2A . You are receiving this because you were mentioned.Message ID: @.***>

harshmittal2210 commented 1 year ago

Ohh that is great. Wish I could help earlier.

Do let me know how your efforts turn out to be!