Module properties
Supplier information
The ESP32 C3 OLED development board is based on the ESP32C3FN4/FH4, which is designed and produced for core boards.
It has a built-in 4M Flash. It has two modes: WiFi and Bluetooth, with a ceramic antenna, and is equipped with a 0.42-inch OLED screen, and supports USB software download.
The board measures 25mm by 20.5mm and the two rows of holes are 700mil or 17.78mm apart.
The on-board blue LED is connected to pin 8 (GPIO8).
Buyers comments
People who bought this module wrote:
The module comnsumes about 200mA on 5V via usb-c.
The display was able to be operated using the SSD1306 controller via I2C.
The device is ssd1306-compatible and the constructor for the library is 'u8g2_ssd1306_72x40_er_f_hw_i2c u8g2(u8g2_r0, u8x8_pin_none, 6, 5);' with no offset needed.
Works with this u8g2 descriptor:
U8G2_SH1106_72X40_WISE_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE, 6, 5); // [full framebuffer, size = 360 bytes]
This Arduino code works:
#include <u8g2lib.h> #include <wire.h> U8G2_SSD1306_72X40_ER_F_HW_I2C u8g2(U8G2_R0, reset=U8X8_PIN_NONE, clock=6, data=5); void setup() { u8g2.begin(); u8g2.clearBuffer(); u8g2.setFont(u8g2_font_6x10_tf); u8g2.drawStr(0, 30, "Hello OLED"); u8g2.sendBuffer(); } void loop() {}
Connections
The pin-out of this module is quite different from the normal Supermini, and the display is connected to the I²C bus formed by GPIO6 as Clock (SCL), and GPIO5 as data (SDA).
Tasmota
Flasing the ESP32
The bin files are here.
First, we will need this binary: tasmota32c3-lvgl.factory.bin. The factory image includes the boot-loader, partition-table, boot-app and the Tasmota binary. Later, to update to new versions, we use OTA, which only requires the Tasmota binary tasmota32c3-lvgl.bin. Use this command line to flash:
esptool.py -b 460800 write_flash 0 ~/Downloads/tasmota32c3-lvgl.factory.bin
Result:
(penv) michiel@Delphinus:~/...> esptool.py -b 460800 write_flash 0 ~/Downloads/tasmota32c3-lvgl.factory.bin esptool.py v4.8.1 Found 33 serial ports Serial port /dev/ttyS9 /dev/ttyS9 failed to connect: Could not open /dev/ttyS9, the port is busy or doesn't exist. (Could not configure port: (5, 'Input/output error')) Serial port /dev/ttyS8 /dev/ttyS8 failed to connect: Could not open /dev/ttyS8, the port is busy or doesn't exist. (Could not configure port: (5, 'Input/output error')) (... many more ...) Serial port /dev/ttyS0 /dev/ttyS0 failed to connect: Could not open /dev/ttyS0, the port is busy or doesn't exist. (Could not configure port: (5, 'Input/output error')) Serial port /dev/ttyACM0 Connecting... Detecting chip type... ESP32-C3 Chip is ESP32-C3 (QFN32) (revision v0.4) Features: WiFi, BLE, Embedded Flash 4MB (XMC) Crystal is 40MHz MAC: ac:a7:04:ba:0c:d4 Uploading stub... Running stub... Stub running... Changing baud rate to 460800 Changed. Configuring flash size... Flash will be erased from 0x00000000 to 0x00373fff... Compressed 3617360 bytes to 2172667... Wrote 3617360 bytes (2172667 compressed) at 0x00000000 in 11.0 seconds (effective 2635.5 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin... (penv) michiel@Delphinus:~/...>
Monitoring the ESP32-C3 serial port
If you have PlatformIO installed, the monitor function autoselects the port and baud-rate:
(penv) michiel@Delphinus:~/...> pio device monitor --- Terminal on /dev/ttyACM0 | 115200 8-N-1 --- Available filters and text transformations: debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time --- More details at https://bit.ly/pio-monitor-filters --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H 00:00:09.005 WIF: Connect failed as AP cannot be reached 00:00:13.190 WIF: Connecting to AP1 J&E-2.4G in mode HT20 as tasmota-BA0CD4-3284... 00:00:16.471 WIF: Connect failed as AP cannot be reached 00:00:17.494 WIF: Connecting to AP1 J&E-2.4G in mode HT20 as tasmota-BA0CD4-3284... 00:00:20.776 WIF: Connect failed as AP cannot be reached 00:00:22.798 WIF: Connecting to AP1 J&E-2.4G in mode HT20 as tasmota-BA0CD4-3284...
If you have miniterm installed, you have to choose the serial port:
(penv) michiel@Delphinus:~/...> pyserial-miniterm --- Available ports: --- 1: /dev/ttyACM0 'USB JTAG/serial debug unit' --- 2: /dev/ttyS0 'n/a' --- 3: /dev/ttyS1 'n/a' --- 4: /dev/ttyS2 'n/a' --- 5: /dev/ttyS3 'n/a' (... many more ...) --- 32: /dev/ttyS30 'n/a' --- 33: /dev/ttyS31 'n/a' --- Enter port index or full name: 1 --- Miniterm on /dev/ttyACM0 9600,8,N,1 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- 00:00:17.494 WIF: Connecting to AP1 J&E-2.4G in mode HT20 as tasmota-BA0CD4-3284... 00:00:20.776 WIF: Connect failed as AP cannot be reached
Setting the correct Wifi properties
You will have to enter a backlog command in the Platformio monitor or miniterm as follows (and concluding by pressing the enter key):
backlog ssid1 Fritz; password1 xxxMySecretPasswordxxx
Problem is, that you do not see anything when typing it. So, it is easier to just copy it from elsewhere and paste it in. Just paste it in the terminal window. The device will answer with a line "CMD: " and your typed text.
(penv) michiel@Delphinus:~/...> pio device monitor -b 115200
--- Terminal on /dev/ttyACM0 | 115200 8-N-1
--- Available filters and text transformations: debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
00:06:33.410 WIF: Connect failed as AP cannot be reached
00:06:34.434 WIF: Connecting to AP1 J&E-2.4G in mode HT20 as tasmota-BA0CD4-3284...
00:06:39.740 WIF: Connecting to AP1 J&E-2.4G in mode HT20 as tasmota-BA0CD4-3284...
00:06:43.022 WIF: Connect failed as AP cannot be reached
00:06:44.046 WIF: Connecting to AP1 J&E-2.4G in mode HT20 as tasmota-BA0CD4-3284...
00:06:46.928 CMD: backlog ssid1 Fritz; password1 xxxMySecretPasswordxxx
00:06:46.977 RSL: RESULT = {"SSId1":"Fritz"}
00:06:47.177 RSL: RESULT = {"Password1":"xxxMySecretPasswordxxx"}
00:06:47.328 WIF: Connect failed as AP cannot be reached
00:06:49.001 WIF: Connecting to AP1 Fritz in mode HT20 as tasmota-BA0CD4-3284...
00:06:51.183 APP: Restarting
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40381d16
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x98
load:0x403cc710,len:0x824
load:0x403ce710,len:0x2204
entry 0x403cc710
00:00:00.001 CMD: Using USB CDC
00:00:00.001 HDW: ESP32-C3 v0.4
00:00:00.017 UFS: FlashFS mounted with 304 kB free
00:00:00.024 CFG: Loaded from File, Count 23
00:00:00.026 SER: Set to 8N1 115200 bit/s
00:00:00.026 SER: HWCDC supports 115200 bit/s only
00:00:00.030 QPC: Count 1
00:00:00.072 BRY: Berry initialized, RAM used 5667 bytes
00:00:00.084 Project tasmota - Tasmota Version 15.3.0.1(faf9067-lvgl-haspmota)-3.3.7(2026-02-23T16:57:17)
00:00:01.001 WIF: Connecting to AP1 Fritz in mode HT20 as tasmota-BA0CD4-3284...
00:00:03.362 WIF: Connected
00:00:03.616 HTP: Web server active on tasmota-BA0CD4-3284 with IP address 10.0.3.75
So, now we can access the Tasmota UI in a web browser at http://10.0.3.75.
This also means that we can now enter Tasmota commands at the console - no need for a wired connection any more!
Setting a secondary SSID
You can also set a secondary wifi address as follows:
backlog ssid2 Fritz; password1 xxxMySecretPasswordxxx
Tasmota configuration
Timezone
Look up the commands here: https://tasmota.github.io/docs/Timezone-Table/
I live in Europe/Brussels zone, so for me this is:
Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120
The result is:
20:24:43.208 CMD: Backlog0 Timezone 99; TimeStd 0,0,10,1,3,60; TimeDst 0,0,3,1,2,120
20:24:43.211 RSL: RESULT = {"Timezone":99}
20:24:43.214 RSL: RESULT = {"TimeStd":{"Hemisphere":0,"Week":0,"Month":10,"Day":1,"Hour":3,"Offset":60}}
20:24:43.218 RSL: RESULT = {"TimeDst":{"Hemisphere":0,"Week":0,"Month":3,"Day":1,"Hour":2,"Offset":120}}
MQTT
Set the MQTT properties in the Tasmota UI in the browser, and you will see this in the terminal:
20:28:10.531 MQT: Attempting connection... 20:28:10.552 MQT: Connected
Device name
In the console, enter the commands:
FriendlyName1 Hans Devicename Hans Hostname hans
You can now access the device at this URL, instead of using the IP-address: http://hans/.
Template
The initial (empty) template is: {"NAME":"ESP32C3","GPIO":[1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1],"FLAG":0,"BASE":1}.
In the Tasmota UI in the browser, go to Configuration -> Module. Configure the GPIOs:
| Pin | Component number | UI label | Comment |
| GPIO10 | 1312 | DS18x20 | temperature sensor for the example below |
| GPIO5 | 640 | I2C SDA1 | Software I2C |
| GPIO6 | 608 | I2C SCL1 | Software I2C |
| GPIO2 | 5730 | OptionA3 | Specific device options to be served in code |
Setting the teleperiod
The console in the Tasmota web-UI shows measurements from sensors as soon as they arrive. Independently, at a certain interval called the “teleperiod”, a Tasmota device reports its status and measured values to other devices or platforms (often via MQTT).
By default, this interval is 300 seconds (5 minutes). You can adjust this interval, but it cannot be less than 10 seconds. For me, 300 seconds is a bit long, so we change to 30s:
20:01:38.067 CMD: teleperiod 30
20:01:38.071 MQT: stat/tasmota_BA0CD4/RESULT = {"TelePeriod":30}
Configure the Display
Finding the display
The command to scan the I2C bus finds one device - the OLED display:
21:47:37.101 CMD: I2CScan0
21:47:37.120 MQT: stat/tasmota_BA0CD4/RESULT = {"I2CScan":"Device(s) found on bus1 at 0x3c"}
Setting the driver
Use the universal display driver by entering this command: DisplayModel 17.
We also need a descriptor file SSD1306_70x42_display.ini. Create this file as display.ini in the Tasmota file system.
Show something on the display
If we go to the menu “Tools” and then “Console”, we can enter a command to show a text on the OLED display. First set the mode (mode 0 is default, but anyhow):
19:48:06.225 CMD: displaymode
19:48:06.230 MQT: stat/tasmota_BA0CD4/RESULT = {"DisplayMode":0}
Then try to display some text:
19:54:17.434 CMD: DisplayText Hello world
19:54:17.489 MQT: stat/tasmota_BA0CD4/RESULT = {"DisplayText":"Hello world"}
Show the measured temperature on the display
In this example, we presume we have a DS18B20 temperature sensor connected to the module.
The display should update whenever a new value of the temperature is measured by the DS18B20 sensor. We will implement this in the programming language Berry, by uploading a file named autoexec.be to the Tasmota filesystem. We can use the following function to show the measured temperature value with some Berry code. Add the following to the autoexec.be here:
var oldvalue = 5000
def updatetemp(value)
if (value != oldvalue)
tasmota.cmd("DisplayText T=" .. value .. " C")
oldvalue = value
end
end
tasmota.add_rule("DS18B20#Temperature", updatetemp)