Articles
Long, didactic texts about MicroPython on the ESP32 DevKit V1: the reason behind each concept, the board's numbers with their source, and examples you open in the simulator with one click.
From the syllabus to a planned semester
- Teaching plan and calendar built automatically
- Class diary ready to paste into SIGA
- Slides and exercise lists with answer keys
Free Community edition · Windows
-
Getting started
Getting Started with MicroPython on the ESP32
What MicroPython is, how the ESP32 DevKit V1 runs your main.py, the GPIO2 LED, timing, your first LED on a breadboard and the path to a real board.
16 min read ·
-
Digital inputs
ESP32 GPIO Inputs: Pull-Up, Pull-Down and the Floating Pin
How the ESP32 reads a pin: logic levels, internal pull-up and pull-down, the floating pin, GPIOs 34 to 39, Pin.irq interrupts and button debounce.
13 min read ·
-
PWM
ESP32 PWM in Practice: LED, Buzzer and Servo
Pulse-width modulation on the ESP32 with MicroPython: frequency, duty, why 1000 Hz becomes 998, LED brightness, buzzer notes and the SG90 servo angle.
12 min read ·
-
Analog
The ESP32 ADC: Attenuation, the Calibration Curve and Why It Stops Short of 3.3 V
How the ESP32 measures voltage in MicroPython: read and read_uv, ADC1 vs ADC2, the four attenuations, calibration, potentiometer, LDR and moving average.
12 min read ·
-
Sensors
Sensors on the ESP32: DHT22, HC-SR04, PIR and the Voltage Divider
DHT22, HC-SR04 and PIR on the ESP32 with MicroPython: each sensor's protocol, the errors the board shows and the voltage divider on the 5 V ECHO pin.
12 min read ·
-
Displays
I2C on the ESP32: SSD1306 OLED and 16×2 LCD with MicroPython
The I2C bus on the ESP32 — addresses, scan, pull-ups and ENODEV errors — and how to use the SSD1306 OLED and the 16×2 PCF8574 LCD in MicroPython.
12 min read ·
-
Non-blocking time
Programming Without Freezing: ticks, Timer and State Machines
Why sleep freezes the ESP32 and how to run several tasks at once in MicroPython with ticks_ms and ticks_diff, machine.Timer and state machines.
12 min read ·
-
IoT
Wi-Fi, HTTP and MQTT on the ESP32 with MicroPython
Wi-Fi with network.WLAN, HTTP with requests and MQTT with umqtt.simple on the ESP32: connection states, board errors and testing it all in the simulator.
12 min read ·
-
Fundamentals
What an Algorithm Is and How Python Runs Your Program Line by Line
Learn what an algorithm is, how Python reads the file from top to bottom, what memory holds after each line and how to recognize your first errors.
18 min read ·
-
Fundamentals
Input and Output in Python: print() and input() in Practice
Learn to show results with print() and to read data from the keyboard with input(): sep, end, f-strings, the text input() returns and the most common errors.
12 min read ·
-
Fundamentals
Variables and Data Types in Python: int, float, str and bool
What a variable is, how to choose names, what int, float, str, bool and None are, and why the ESP32's decimals give different results from the computer's.
13 min read ·
-
Fundamentals
Arithmetic Operators and Precedence in Python: /, //, % and **
Learn to use +, -, *, /, //, % and ** in Python, the order in which calculations are solved and the precedence errors that fool even experienced programmers.
12 min read ·
-
Fundamentals
Type Conversion in Python: int(), float(), str() and the Most Common Errors
Learn int(), float() and str() in Python, how to turn the text from input() into a number and how to read ValueError and TypeError when a conversion fails.
16 min read ·
-
Fundamentals
Relational and Logical Operators in Python: ==, !=, <, and, or and not
Learn to compare values in Python with ==, != and <, to combine conditions with and, or and not and to decide which route to follow or when to recalculate.
17 min read ·
-
Fundamentals
Truth Tables in Python: Checking Conditions with and, or and not
Build truth tables in Python to test conditions with and, or and not, check whether two expressions are equivalent and find the case that was left out.
13 min read ·
-
Fundamentals
The if and else Structure in Python: Decisions, Indentation and Indentation Errors
Learn to use if and else in Python so the program chooses between two paths, understand indentation as part of the syntax and fix indentation errors.
14 min read ·
-
Fundamentals
if, elif and else in Python: Several Ranges and Nested Conditions
Learn to choose among three or more paths with if, elif and else in Python, to order the ranges and to nest conditions without getting lost in indentation.
13 min read ·
-
Fundamentals
Choosing Among Many Options in Python: elif, in and Dictionaries
Learn when to use an elif chain, the in operator or a dictionary to choose among many options in Python, and why MicroPython has no match/case.
15 min read ·
-
Fundamentals
Why Repeat: An Introduction to Loops in Python
Understand what a loop is in Python, the three questions every loop answers, how to follow the passes by hand and why a loop can never end.
15 min read ·
-
Fundamentals
The while Loop in Python: Repetition with the Test at the Start
Learn the while loop in Python: the four pieces, the counter, sentinel and flag patterns, compound conditions and the mistakes behind infinite loops.
15 min read ·
-
Fundamentals
The for Loop and the range() Function in Python
Learn the for loop in Python with range() of one, two and three arguments, loop over text and sequences and avoid the trap of the excluded limit.
13 min read ·
-
Fundamentals
Do-While in Python with while True and break
Python has no do-while. See how to repeat a block that must run at least once with while True and break, in input validation, menus and waits.
12 min read ·
-
Fundamentals
break, continue and the else of Loops in Python
Learn to control for and while in Python with break, continue and the loop else: searches, filters, attempts and the traps that freeze the program.
12 min read ·
-
Fundamentals
Functions in Python: def, Calling and Divide and Conquer
Learn to create functions in Python with def, call them by name, understand the order of execution and divide a program into small parts.
15 min read ·
-
Fundamentals
Parameters and Arguments in Python: Positional, Named, Default Values and *args
Learn to pass values to functions in Python: parameters and arguments, position and name, default values, *args and the most common traps.
14 min read ·
-
Fundamentals
return in Python: Returning One or Several Values
Understand return in Python: handing back a value, how it differs from print, leaving a function early, None and returning several values with tuples.
14 min read ·
-
Fundamentals
Variable Scope in Python: local, global and nonlocal
Understand variable scope in Python: local and global names, the search order, the local variable without a value error and when to use global and nonlocal.
14 min read ·
-
Fundamentals
Recursion in Python: the Function That Calls Itself (and the Limit in MicroPython)
Understand recursion in Python: base case, recursive step, call stack, the recursion limit in MicroPython and when a loop is the better choice.
13 min read ·
-
Fundamentals
lambda, map, filter and sorted with key in Python
Learn lambda, map, filter and sorted with key in Python: small functions passed as arguments, what each one does and MicroPython's unstable sort.
14 min read ·
-
Fundamentals
Lists in Python: Creating, Accessing, Changing and Going Through
Learn lists in Python: create, access by index and slice, change with append and pop, understand copies and iterate with for, enumerate and while.
18 min read ·
-
Fundamentals
List Operations in Python: Searching, Filtering and Comprehensions
Learn to search, filter and transform lists in Python: the loop with append, list comprehension, any and all, sort and sorted, with ESP32 examples.
15 min read ·
-
Fundamentals
Tuples and Unpacking in Python: Values That Do Not Change
Understand tuples in Python: create, access, why they do not change, the comma in (5,), unpack with a, b = b, a and the asterisk, plus loops and the ESP32.
14 min read ·
-
Fundamentals
Dictionaries in Python: Key, Value and Counting
Learn dictionaries in Python: create, read with [] and get, change, loop with items, count words, group and the order of items in MicroPython.
17 min read ·
-
Fundamentals
Sets in Python: No Repetition and Set Operations
Learn sets in Python: create with set, remove duplicates, add and discard, union, intersection, difference, item order and uses on the ESP32.
13 min read ·
-
Fundamentals
Strings in Depth in Python: Slicing and the Most Used Methods
Master strings in Python: indexes and slices, immutability, split, join, replace, find, formatting, and what the ESP32's MicroPython does not have.
16 min read ·
-
Fundamentals
Matrices in Python with Lists of Lists: Rows and Columns
Learn to create, access and go through matrices in Python with lists of lists, avoid the asterisk trap and see real uses on the ESP32.
19 min read ·
-
Fundamentals
Matrix Operations in Python: Sum, Transpose and Diagonal
Add matrices position by position, build the transpose with loops or zip, extract the diagonals and test symmetry, with examples for the ESP32.
18 min read ·
-
Fundamentals
Linear Search and Binary Search in Python
Learn to look for a value in a list with linear search and with binary search, count the steps of each one and see real uses with the ESP32.
19 min read ·
-
Fundamentals
Bubble Sort and Selection Sort in Python, Step by Step
Understand how bubble sort and selection sort order a list, count comparisons and swaps, avoid the classic errors and see uses on the ESP32.
17 min read ·
-
Fundamentals
Insertion Sort in Python and When to Use sorted()
Learn insertion sort, compare it with bubble and selection, see why it is stable and know when to use sorted() and sort() instead of writing it by hand.
17 min read ·
-
Fundamentals
Merge Sort and Quick Sort in Python: Divide and Conquer
Understand how merge sort and quick sort order a list by dividing it, write both with recursion, compare the cost and learn the simulator's recursion limit.
17 min read ·
-
Fundamentals
Algorithm Complexity (Big-O) Explained with Python
Learn what Big-O notation is, count steps in Python and compare O(1), O(log n), O(n) and O(n²) with examples that run in the simulator, no stopwatch.
21 min read ·
-
ESP-NOW
ESP-NOW on the ESP32: Boards Talking Without a Router
How ESP32 boards exchange messages directly over the radio with MicroPython's espnow: MAC, peers, channel, broadcast, byte limit and struct messages.
14 min read ·
-
Web server
Web Server on the ESP32: Controlling the Board from the Browser
The ESP32 as an HTTP server with sockets in MicroPython: station and access point, request and response text, routes, a sensor page and asyncio.
12 min read ·
-
Storage
Storing Data on the ESP32: Files, NVS, RTC Memory, SD and EEPROM
Where to store data on the ESP32 with MicroPython: RAM, LittleFS files, NVS, RTC memory, SD card, EEPROM and FRAM, flash wear and batched writes.
11 min read ·
-
Power
Batteries on the ESP32: Runtime, Deep Sleep and a Battery That Lasts Years
How much the ESP32 draws in each mode, which battery to pick, how to charge it, measure charge, estimate runtime and make a lithium battery last for years.
17 min read ·
-
AI
AI with the ESP32: TinyML on the Board and Integrating an LLM
The three ways to use AI with the ESP32 — a small model on the chip, an LLM on a server or both together —, with examples and security precautions.
12 min read ·
-
Project
Project: Sonar Armband with an ESP32-C3 Super Mini, a Proximity Sensor on Your Arm
Step-by-step armband with an HC-SR04 and a buzzer on the ESP32-C3 Super Mini that beeps faster as an obstacle gets closer, like a car's parking sensor.
11 min read ·
-
Project
Project: A Drawer Lock Opened by Phone with an ESP32-C3 Super Mini and a Servo
Step-by-step lock with an SG90 servo and an LED on the ESP32-C3 Super Mini, run from a phone page over the board's own Wi-Fi network, with a password.
11 min read ·
-
Project
Project: A Night Light That Turns On with Movement in the Dark, with the ESP32-C3 Super Mini
Step-by-step hallway light with a PIR sensor, an LDR and an LED on the ESP32-C3 Super Mini: it fades on when someone passes in the dark and fades out slowly.
11 min read ·
-
Project
Project: A Wristwatch with the ESP32-2424S012 Round Board (ESP32-C3 and a 1.28" Screen)
Step-by-step analog watch on the ESP32-2424S012 round board: OLED prototype in the simulator, time from the internet and a screen that lights up on a button.
11 min read ·
-
Project
Project: A Wrist Messenger, Two Watches That Talk over ESP-NOW with No Phone or Internet
Step-by-step pair of wrist communicators with the ESP32-2424S012 round board: quick phrases over ESP-NOW, delivery confirmation and only the BOOT button.
11 min read ·
From the syllabus to a planned semester
- Teaching plan and calendar built automatically
- Class diary ready to paste into SIGA
- Slides and exercise lists with answer keys
Free Community edition · Windows
The AI that remembers your life and lives on your computer
- Long-term memory with the source of every answer
- Works offline: your data stays on your PC
- Reads PDFs, slides, photos and meeting recordings
Essential plan free forever