• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Oled Display connected to ESP 8266

Q&A Forum › Category: ESP8266 › Oled Display connected to ESP 8266
0 Vote Up Vote Down
dominique.nad1 asked 5 years ago

Dear Rui,

For Home Automation applications,

How to use an “OLED Display” with an ESP for a control visual only and to read only directly on display ip address or status if connected or disconnected… without laptop , PC …smartphone

I’m not sure that it possible to get all datas on this screen display as on monitior ide plateform.

Many thanks and best regards

Dominique

3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Dominique.

Yes, it is possible, but it is limited to the size of the display.

For example, instead of displaying the error messages on the Serial Monitor in case it is not connected, you need to display them on the OLED display. But you need to write the code for that.

You can also display the IP address on the OLED display.

For example, Check if it is connected to the wi-fi. If it isn’t, display an error message on the OLED:

if (WiFi.status() != WL_CONNECTED){
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0, 10);
  display.println("Wi-Fi not connected");
  display.display();
}

I’m not sure if there are better ways to do this. Because if you have more messages, you need to put the cursor in different coordinates.

Let me know if you need help with handling the OLED display or if you found a better way.

Regards,
Sara

0 Vote Up Vote Down
dominique.nad1 answered 5 years ago

Hi Sara,
Firstly i’m very sorry for my reply just now and many thanks for your help. I also investigate your special guide for the Oled screen SSD1306 to learn all the fonctions step by step. But unfortunately I didn’t find how to get the yellow and blue colours and I’m not sure it’s possible for the SSD1306.
Regarding how to get IP address directly on screen, your way is all good. I also want to use the ” String Method ”    but my code was wrong and too difficult for my level. Do you know a guide or an advice to sudyt this section of code ?
Actualy I’m working for several automation projects with Ide arduino and after few test with ESP 8226-01 and i use now  an old ESP8266 on Wemos D1-R2. Following Rui guides,  i use few design Soft AP or Station Mode on LAN network  or internet network with secure Base 64… Next i’going to try deep sleep sytem or trigger to reduce the batterie consumption of module outside .
Thanks by advance and best regards.
Dominique
 

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Dominique.

To display the IP address on the OLED, you can use the following lines after connecting to Wi-Fi (prints on serial monitor and oled):

Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
display.setCursor(0,20);
display.print("Access web server at: ");
display.setCursor(0,30);
display.print(WiFi.localIP());
display.display();

Regarding the blue and yellow colors – I don’t know how to change those colors. I think it’s specific to one of the OLED models. Recently, I bought an SSD1306 OLED display and find out that the first lines appear in yellow and the rest of the lines in blue while my previous OLED display just displays white in black background.

Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.