ESP-IDF is Espressif’s official framework for programming ESP32 boards. Learn the fundamentals with easy-to-follow examples: interact with GPIOs, Communication Protocols, Wi-Fi, Bluetooth, Deep Sleep, ESP-NOW, and more.
This is our new eBook, which was released on August 25, 2026. During the launch, we are offering a special price. Registration for the eBook closes in a few days so that we can provide support to all enrolled students (closes when the timer below hits zero).
Learn ESP-IDF with ESP32: The Beginner’s Guide is a practical introduction to using the ESP-IDF (Espressif IoT Development Framework) to program ESP32 boards.
This eBook is intended to be a guide for those new to ESP-IDF with simple, straightforward examples for a wide range of subjects related to the ESP32: GPIO control, communicating with sensors via the I2C protocol, connecting to a Wi-Fi network, serving a basic HTML page, creating a simple BLE client, ESP-NOW communication, and more.
What is ESP-IDF?
ESP-IDF, Espressif IoT Development Framework, is the original framework developed by Espressif (the developer of ESP32 chips) to program ESP32 boards.
It is an SDK (software development kit) to develop applications for ESP32 chips using mainly the C programming language that gives you low-level access to the hardware, the real-time operating system (FreeRTOS), and advanced features of the ESP32.
What about Arduino IDE/Core?
Compared with Arduino IDE/Core, ESP-IDF gives you more options for customization, performance, and control over ESP32 peripherals, configurations, and tasks.

ESP-IDF uses FreeRTOS for task-based real-time programming, while the Arduino IDE relies on the setup() and loop() structure. As a result, ESP-IDF is more complex than the Arduino IDE.
You need to understand a bit more about how the system and hardware work, and you’ll need to build and understand configurations for GPIO control, FreeRTOS tasks, peripheral initialization, and more.
So, is it really that difficult to understand and learn?
Not necessarily.
Of course, this extra control comes with more complexity, and you’ll need some background to get started.
ESP-IDF is not for everyone, and we don’t recommend it if you’re completely new to microcontrollers.
But if you’re already familiar with the ESP32 and have some basic C programming knowledge (as you probably do if you’ve programmed with Arduino), you may find that ESP-IDF isn’t as complicated as it first seems once you understand the fundamentals.
It can feel challenging at first, but once you get familiar with the basics, you’ll start to see why many people prefer ESP-IDF.
What’s inside the eBook?
The Learn ESP-IDF with ESP32 eBook is a colorful 370-page PDF with 7 Modules covering the most important subjects related to ESP32 programming with ESP-IDF. It includes multiple examples with the source code, schematics, and screenshots that are easy to follow.
Each module breaks down a specific subject and allows for quick referencing in the future. It covers each subject with practical, simple examples (click here for the detailed table of contents):
- Module 1: Introducing ESP-IDF and Its Basic Programming Concepts
- Module 2: GPIO Control
- Module 3: Deep Sleep
- Module 4: I2C Communication
- Module 5: Wi-Fi
- Module 6: Bluetooth Low Energy
- Module 7: ESP-NOW
- more modules and units will be added in a future edition
Here’s what you’ll have access to when you get the eBook:
- eBook in PDF format (7 Modules, 370 pages)
- Source code (.c files)
- Unlimited free updates (includes new modules and units added)
- Access to our private Forum to ask questions
- Exclusive access to our Facebook group community
Table of Contents
The eBook comes with 7 Modules. Each module is dedicated to a specific subject. Here’s the detailed table of contents:
MODULE 0: Introduction

This Module is a brief introduction to the eBook. We’ll provide an overview of the Modules covered, what you’ll learn, recommended prerequisites, how to follow the eBook, the parts required, and the software we’ll use.
MODULE 1: Getting Started with ESP-IDF

This Module is an introduction to ESP-IDF. You’ll learn how to install the ESP-IDF extension on VS Code, how to create a new project, and how to upload code to the ESP32. We also cover some ESP-IDF fundamental programming concepts.
- 1.1 – Introducing ESP-IDF
- 1.2 – Installing ESP-IDF Extension
- 1.3 – Testing the Installation
- 1.4 – ESP-IDF Programming: Key Concepts
- 1.5 – Blinking an LED
MODULE 2: GPIO Control

Learn how to control and configure the ESP32 GPIOs using configuration structures. Set them as digital inputs or outputs, analog inputs, produce PWM signals, and set them as interrupts.
- 2.1 – Controlling Digital Outputs
- 2.2 – PWM: Controlling LED Brightness with LEDC Controller
- 2.3 – Reading Digital Inputs
- 2.4 – Reading Analog Inputs (ADC – Analog to Digital Converter)
- 2.5 – GPIO Interrupts (Button with Debouncing)
MODULE 3: Deep Sleep

Putting the ESP32 in deep sleep mode is a great way to save power in your IoT projects. Learn how to put the ESP32 in deep sleep and the different ways to wake it up.
- 3.1 – Introducing Deep Sleep
- 3.2 – Deep Sleep with Timer Wake Up
- 3.3 – Deep Sleep with Touch Wakeup
- 3.4 – Deep Sleep with External Wakeup
MODULE 4: I2C Communication

Learn the basics of the I2C communication protocol. Create an I2C scanner sketch and learn how to read data from a BME280 sensor by writing and reading from its registers and by using an ESP-IDF component.
- 4.1 – I2C Communication – Introduction
- 4.2 – I2C Scanner
- 4.3 – ESP32 I2C with BME280 Sensor (Temperature, Humidity, Pressure)
- 4.4 – ESP32 EP-IDF Component: BME280 Sensor
MODULE 5: Wi-Fi

This Module covers Wi-Fi with the ESP32. It includes how to build a simple web server to display a web page, another one to control one GPIO, and how to set the ESP32 as a station or access point. We also cover how to get data from the internet with HTTP requests.
- 5.1 – ESP32 Wi-Fi Scanner (Scan Nearby Networks RSSI)
- 5.2 – ESP32 Simple Web Server (Serve HTML Page)
- 5.3 – ESP32 Web Server Access Point (AP) Mode
- 5.4 – ESP32 Web Server – Basic HTTP Authentication (Login/Logout)
- 5.5 – ESP32 Web Server – Output Control
- 5.6 – HTTP GET Request (Time API)
MODULE 6: Bluetooth Low Energy

An introduction to Bluetooth Low Energy and how to set the ESP32 as a BLE peripheral with the Environmental Sensing Service with the temperature characteristic.
- 6.1 – Introducing BLE
- 6.2 – The ESP32 as a BLE Peripheral
MODULE 7: ESP-NOW Communication

Getting started with the ESP-NOW communication protocol. Learn the basics of ESP-NOW and how to program a sender and a receiver.
- 7.1 – Introducing ESP-NOW
- 7.2 – ESP32 MAC Address
- 7.3 – ESP-NOW Sender and Receiver
Recommended ESP32 Board
Any ESP32 board model should be suitable for the projects in this eBook. We used an ESP32 with the ESP32S3 chip, but other board models are perfectly suitable.

Software That We’ll Use
We’ll program the ESP32 using the ESP-IDF extension on VS Code. We explain how to install everything throughout the eBook.

Prerequisites
To follow and understand the examples in this eBook, we recommend that:
- you have at least some basic understanding of the C programming language, which you should have if you’ve already built projects using Arduino IDE;
- be familiar with the ESP32 board.
- understanding of the ESP32 hardware, more specifically about its pinout. From the pinout diagram of your board, you should be able to identify the inputs, outputs, interrupts, etc.
Why We Wrote this eBook?
We’ve been writing about the ESP32 on our blog for years, mostly focusing on programming it with Arduino IDE.
Our readers kept asking for an easy-to-understand eBook on ESP-IDF.
Especially one suitable for beginners. So here it is. We created this content for our readers, and we are in no way affiliated with or related to Espressif Systems.
Invitation to Join our Private Forum!
This eBook comes with the opportunity to join our private Forum of like-minded people where you can ask questions about the eBook or other related subjects. You’ll get direct help from us (Rui and Sara) or from other active members of the community.

Download the eBook
- New eBook – Released August 25, 2026
- 7 Modules
- PDF eBook with 370 pages
- Source code (.c files)
- Parts list and schematic diagrams
- Step-by-step instructions
- Unlimited free updates (includes new modules and units added)
- Exclusive access to our private forum
- English language
- Created by Rui Santos and Sara Santos
GET THE EBOOK | $39 $29 USD »
Click here to get the eBook | $39 $29 USD
This is our new eBook, which was released on August 25, 2026. During the launch, we are offering a special price. Registration for the eBook closes in a few days so that we can provide support to all enrolled students (closes when the timer below hits zero).
Note: after your purchase, you receive an email with a username and password that you use to access the members’ area and download the PDF eBook.
Have questions? Email me at https://randomnerdtutorials.com/support anytime for any reason.
You won’t regret it. My 60-day money-back guarantee backs up every word in this message. Proceed with confidence. See you inside,
– Rui Santos and Sara Santos
Frequently Asked Questions
Meet the Authors
See what others are saying about our work
(…) I have 11 of your courses and love all of them. I recommend your courses and web site in all my correspondence for anyone in learning Arduino, ESP32, MicroPython, RaspPi subjects. Even though this is just a hobby for me, your stuff has given me more enjoyable learning than any other authors on this – for over 30 years. Thanks for all you do.
William Taylor
Thank you Rui. Anyone wondering whether you bring value can rely on my word. I’ve purchased hundreds of books over a 45 year career as engineer and entrepreneur. NONE of these books have approached your excellent method of teaching a subject. You have a rare gift as a teacher. Glad to have made the purchases.
Paul
I purchased all of your Random Nerd Tutorials Courses. I have completed the ESP32-CAM Projects and SMART HOME courses and have never seen such great e-books for Raspberry, Arduino and ESP microcontrollers before. Your chosen modules show great possibilities and the step by step instructions are very useful. This saved me a lot of frustration and I could quickly achieve great results. Thank you very much.
Chris Steffes
I want to congratulate you on the manuals you have created, they are the best of the best that I have seen in many years. (… ) Your explanations are very clear and very detailed, as if you were a teacher…
Tino Fernández
I placed the order of these ebooks/courses and have downloaded the eBooks. The ebooks are very informative and very well presented, as is your website(…).
Robert Kyle
I appreciate your eBooks, and especially your support that comes with them! Thank you
Joe Margevicius
I want to thank you for the high quality of your projects. Too many others just list a series of tasks but not what to do when they do not go as planned. The detail that you have put into the writeups is amazing. I am working with my 10 year old grandson to help this interest in electronics and software. It would be much harder without your guides.
Doug Hogg
Thank you. I’ve bought two of your course books and they really accelerate the learning curve with the result I wanted.
Paul Kroshko
This is just a thank you! I’ve used bits of your code in almost all my projects. Because of your tutorilas I managed to get a job yesterday.
Jan Gremmler
AS SEEN ON…

