ESP32 reference

MicroPython reference

Other useful links

The second pinout on this page is close to what we have, but not quite:

Installing libraries

To use a library that isn't included in MicroPython by default, you'll need to save a copy of the library onto the ESP32.

  1. Download the library from the internet to your computer. This will just be a normal Python code file, with a .py extension.

  2. Open the file in Thonny (from wherever you've saved it on your computer).

  3. Select File > Save copy and then select “MicroPython device”.

  4. In the file dialog that appears, give it the same name (e.g.,

  5. Click “OK”, and it should complete in a few seconds.

All done!

Some libraries we're using

Right-click to save these to your computer.

How much room do I have for libraries?

Not much… and quite a lot. When flashed with MicroPython, the ESP32 chips we have 2MB of memory available for libraries and code. By modern computer standards, that's not very much. However, 2MB is enough to hold tens of thousands of lines of code. As long as you're just writing code and not storing images or other large data files, you should have plenty of space.

To see how much space is left on the device, you can open the Thonny file browser (View > Files), click the “hamburger” menu icon next to “MicroPython device”, and select “Storage space”.