logo elektroda
logo elektroda
X
logo elektroda

ESP32 + OLED WiFi and BT module - commissioning, tests, description

TechEkspert 
Soon, on elektroda.pl, a WiFi module will appear with an ESP32 board and an OLED SSD1306 display. The ESP32 capabilities and the integration with Arduino are described here: ESP32 + Arduino . The English-language description of the integration is available here: ESP32 & Arduino on Windows .
The SSD1306 display works on the I2C bus at the address 0x3C. SCL is connected to pin 4, SDA to I / O 5 - ESP32. On the board we find a USB UART converter, a 3.3V stabilizer and ESP32 terminals led to the edges of the board. The monochrome OLED display provides a very good contrast and a pleasant image appearance.


One of the libraries, eg U8g2, can be used to operate the display. After selecting Sketch-> Attach Library-> Manage Libraries, we can add or update U8g2. The configuration of the built-in display in U8g2 is as follows:
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2 (U8G2_R0, / * clock = * / 4, / * data = * / 5, / * reset = * / U8X8_PIN_NONE);
Set the board as Wemos ESP32: Tools-> WEMOS LOLIN32

ESP32 has more RAM than ESP8266 or ATmega328 and we can more conveniently process data in JSON format provided in the API of many systems. For example, the weather forecasts http://openweathermap.org/api and https://www.wunderground.com/weather/api or air quality data https://airly.eu/pl/api/ are available as JSON.
Much of this data is available online for free, just register an account and receive your personal key.

In the case of openweathermap http://openweathermap.org/price, after creating an account, we receive our key, after checking what ID has our city http://bulk.openweathermap.org/sample/city.list.json.gz (e.g. for Warsaw 7531926 ) we can send inquiries and present the weather forecast on the display.

To conveniently process JSON data, add the ArduinoJson library to Arduino by searching for it in Sketch-> Attach library-> Manage libraries.

We get the weather forecast for the following hours in a fairly simple way:


Below is an example of a simple code that you can adapt both to display the current weather forecast, as well as to virtually any data published by JSON. Instead of descriptions, you can enter a graphical representation of the weather forecast: https://openweathermap.org/weather-conditions

Code: C / C++
Log in, to see the code


What ideas do you have for using a miniature WiFi module with ESP32 and a 128x64 OLED display?


About Author
TechEkspert
TechEkspert wrote 6247 posts with rating 4909 , helped 16 times. Been with us since 2014 year.

Comments

george2002 26 Feb 2018 23:38

Everything was nice, but you could not use all the subtitles in Polish, only in English ... in short, did the author add anything to the code or just compiled it? :) ? what Flash and RAM capacity of this... [Read more]

TechEkspert 27 Feb 2018 05:48

As I wrote, the ESP32 parameters and the integration method can be found in the linked material to the previously shared module. I wrote the code based on the available examples, there is nothing innovative... [Read more]

atek000 27 Feb 2018 10:43

I can see a small minus of this module, especially at the beginning as we want to play with everything and check everything. The display is on one side and the buttons are on the opposite. If you stick... [Read more]

piterek-23 27 Feb 2018 13:45

Buddy, you can plug this module into the breadboard so that the buttons and the USB socket will be behind the plate ;) [Read more]

atek000 27 Feb 2018 14:08

Sure I can, I know it and everyone who plays with such modules. My point is that everything on the same side would be more convenient though. If someone is interested and chooses from many available solutions,... [Read more]

logos 27 Feb 2018 15:52

I also have this module purchased on Aliexpress and I am adding two links http://www.lilygo.cn/ https://github.com/LilyGO?tab=repositories [Read more]

futek2 01 Mar 2018 04:39

Hello. I use the LOLIN ESP32 OLED module as MINI PV LOGER to my ES5000 inverter. Communication is via WIFI within 50 meters. Just a little computer. More details and program code on the link below. ... [Read more]

TechEkspert 03 Mar 2018 09:22

A very nice use of the module as a remote display, WiFi is used or would ESP-Now make sense here? [Read more]

futek2 03 Mar 2018 09:47

Hello. The ESP8266 is installed in the ES5000 inverter and it has been in operation for almost a year. Power supplied by means of a 12VDC / 3.3VDC isolation converter. Photo attached. On ESP8266 it... [Read more]

Bullseye 03 Mar 2018 10:47

I have a quick question, namely what are the differences between: 1. Wemos LOLIN32 lite ESP32 v1.0 (MicroPython uploaded by default) 2. NodeMCU ESP-32S v1.1 According to the description and appearance,... [Read more]

korrus666 09 Mar 2018 22:17

There is a problem with the link: https://git.oschina.net/dfrobot/FireBeetle-ESP32/raw/master/package_esp32_index.json Namely, the json file that is being downloaded has an incorrect link to the Git... [Read more]

rafcio_21 03 Apr 2018 12:41

Hello, I bought this module from gadgets and I have a question whether this OLED is colored or only white inscriptions on a black background. [Read more]

futek2 03 Apr 2018 13:43

Hello. The display in the ESP32 module with OLED is black and white, as in the earlier descriptions on the attached photos. https://www.elektroda.pl/rtvforum/viewtopic.php?p=17071588#17071588 Colors... [Read more]

futek2 12 Sep 2018 11:11

Hello, interested in the topic. For a few days I have been struggling with the problem that I want to transfer the code from ARDUINO UNO to LOLIN ESP32 OLED. The program is practically compiling but it... [Read more]

TechEkspert 12 Sep 2018 22:52

Or maybe try something more high-level? https://techtutorialsx.com/2017/10/07/esp32-arduino-timer-interrupts/ [Read more]

futek2 13 Sep 2018 07:37

I warmly welcome. Thanks TechEkspert for info. I am familiar with it, but it does not work in practice. I want to run the TDR meter according to this concept. The electronics are complete. https://forum.arduino.cc/index.php?topic=183770.msg1365676#msg1365676 ... [Read more]

TechEkspert 16 Sep 2018 19:16

An interesting project, in this application, going down to the register level may pay off. It is worth showing up in DIY later. [Read more]

futek2 16 Sep 2018 20:44

Hello. I am slowly finishing the code, but without any register operations. But when I checked what impulses appear with the help of the LOGIC ANALYZER, it occurred to me that this device would also... [Read more]

tos18 08 Nov 2018 04:39

I would like to propose another way to initialize the oled display. In my case, the change made operations on oled take place at least twice as fast. So to the point is: U8G2_SSD1306_128X64_NONAME_F_SW_I2C... [Read more]