Connect an I2C SSD1306 OLED display and an ESP-01 (ESP8266)

ESP-01 ESP8266 OLED i2C DISPLAY ECRAN LD1117V33 scanner wifi
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp

In this tutorial we will learn how to use a 0.96” monochrome OLED display (based on the SSD1306 chip) with an ESP8266 module and more specifically the ESP-01 module. We will use the 2 GPIO ports available on the ESP-01 to connect the SS1306 OLED display using the I2C bus. To illustrate this article, we will realize a small WiFi scanner project that connects to a WiFi network and displays the ip address assigned to the ESP-01 as well as the strength of the WiFi signal on the OLED screen. In a next project, we will realize a small box by 3D printing to make our Wifi scanner portable and autonomous.

If you’re new to ESP8266, you might also be interested in these products:

Materials required for this project

To carry out the assembly of this project you will need the following equipment:

esp8266 esp-01 module WifiESP-01 module (ESP8266)
adaptateur regulateur 5v 3V esp-01 esp8622ESP-01 adaptor with tension regulator 5V to 3.3V (better)
 module ftdiFDTI module or cable
ssd1331 color oled displayOLED I2C 0.96” monochrome display (SSD1306)
 jumper dupontJumper Dupont
bouton-poussoirButton for Reset (optional)
resistance 220ohmsResistor 220 ohm (optional)

Circuit and procedure for installing the code on the ESP-01

The management of the display on the OLED screen of this project is based on the work of. The WiFi part is managed thanks to the ESP8266Wifi library [Github].

The first step of this project is to put your ESP-01 module in bootload mode. Perform the following wiring.

ESP-01-ESP8266-wiring-flashing-mode

Click to enlarge

Retrieve the project code from the DIY Projects Github. Open the file ESP01-OLED.ino and change the <ssid> and <password> variables according to your WiFi network. Download now the ESP8266Wifi library on Github and install there by going to the menu Sketch -> Include a library -> Add library .ZIP

Choose the Generic ESP8266 Module board and select ArduinoISP as programmer.

Now turn on your ESP8266 and press Upload. If your wiring is correct, downloading starts after compiling the program.

Connect the SSD1303 OLED display and start the WiFi scanner on the ESP-01

Now that the program is installed on the ESP8266, turn off the power to the module.

To use an OLED screen on an ESP-01 we will use the 2 GPIOs available on the module to connect them to the I2C bus that equips the SSD1306. The connection is very simple. Remove the cable connecting the GPIO0 to the GND and connect the OLED I2C screen as follows:

SDA <-> GPIO0

SCK <-> GPIO2

GND <-> GND

VCC <-> 3.3V

You can reverse the wiring. In this case, change the settings in the program and reinstall the program.

ESP-01 ESP8266 OLED i2C DISPLAY ECRAN

Now turn on the ESP-01. The WiFi scanner will first connect to the WiFi network and then retrieve the ip address assigned to the ESP-01 as well as the signal strength. After a few seconds, you should get this:

esp-01 esp8266 oled i2c display wifi scanner

Click to rate this post!
[Total: 0 Average: 0]

Are you having a problem with this topic?

Maybe someone has already found the solution, visit the forum before asking your question
Ask your question

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email
Share on whatsapp

Did you like this project ? Don't miss any more projects by subscribing to our weekly newsletter!

We will be happy to hear your thoughts

      Leave a Reply

      DIY Projects