MicroPython with the ESP32 guide series

Thonny IDE Advanced configuration

In this lesson, I'd like to show you the advanced configuration file of Thonny IDE so that you may modify some of the functionality and that is not possible to do via graphical user interface.

Thonny has an advanced configuration file titled "configuration.ini", found in the Thonny application folder. In this file, you can change settings that control things such as how code is send to the target board, the size of a block, and whether to update the target device RTC (reat time clock) every time Thonny connects to the device.


Thonny advanced configuration options are documented in the project Wiki on GitHub.

To begin with, go to the Thonny project on GitHub.

Then, scroll down to find the link for the wiki and click on it. Look for "MicroPython" in the table of contents and click on it. Once you reach the MicroPython page, scroll down to the advanced configuration section. This provides information about the advanced configuration options available for the ESP32.

Thonny data folder

A shortcut to the data folder is in the Tools menu.

The Thonny data folder.

The easiest way to find the advanced configurations file is to use the Thonny shortcut under the Tools menu. Select "Tools", "Open Thonny data folder...".

This will bring up the folder that contains the "configuration.ini" file.

Open this file with a text editor. It looks like this:

The configuration.ini file with default settings.

Interesting configuration settings

The settings that I'm more interested at the moment are the sync time and the UTC clock time.

As you may know, the ESP32 has a real time clock integrated into the chip. When you use Thonny to upload a program, it is possible for Thonny to reset the clock to the correct system time and date.

To make that work, you make sure that the sync time keyword is set to true.

Another thing that you can consider doing, whether you want the real time clock to be set to UTC time or to your local system time, then you can control that via the UTC clock keyword. When you say false, then the RTC of your ESP32 will be synchronised to your computer's local time.

In Section 12 of the MicroPython course, I have a couple of lectures where I show you how to set the time in the RTC of your ESP32 programmatically, both manually and by getting accurate time and date from an internet atomic clock.

Learn MicroPython for the ESP32

With this video course, you will learn how to use the
MicroPython programming language with the ESP32 micro-controller.

MicroPython is the perfect language for anyone looking for the easiest (yet still powerful) way to program a micro-controller.

We publish fresh content each week. Read how-to's on Arduino, ESP32, KiCad, Node-RED, drones and more. Listen to interviews. Learn about new tech with our comprehensive reviews. Get discount offers for our courses and books. Interact with our community. One email per week, no spam; unsubscribe at any time

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}