We may earn an affiliate commission when you visit our partners.
Dr. Peter Dalmaris

Last Updated in June and July 2022 to cover the latest versions of the Thonny editor (version 4) and MicroPython firmware (version 1.18+).

More details about this update: I have introduced new lectures to show you how to install and use Thonny 4, and how to upgrade your ESP32 devkit and Raspberry Pi Pico boards to use the MicroPython 1.18 firmware.

I have also tested all experiments to ensure that they work with these versions of Thonny and MicroPython.

If you are using an ESP32 board that is unable to automatically enter upload mode, you will find a solution in a new lecture in Section 3.

Read more

Last Updated in June and July 2022 to cover the latest versions of the Thonny editor (version 4) and MicroPython firmware (version 1.18+).

More details about this update: I have introduced new lectures to show you how to install and use Thonny 4, and how to upgrade your ESP32 devkit and Raspberry Pi Pico boards to use the MicroPython 1.18 firmware.

I have also tested all experiments to ensure that they work with these versions of Thonny and MicroPython.

If you are using an ESP32 board that is unable to automatically enter upload mode, you will find a solution in a new lecture in Section 3.

With this course, you will learn how to use MicroPython with the ESP32 microcontroller.

MicroPython is a high-level programming language specifically designed for microcontrollers and resource-limited embedded devices.

Who is this course for?

I have created this course for three types of students:

  1. If you are familiar with Python, you will find that MicroPython looks, feels, and works like regular Python. This course will help you get started quickly, and help you out with the peculiarities of using Python as MicroPython operating on the ESP32 hardware.

  2. If you have little programming experience, MicroPython is a perfect option for learning how to program hardware. This course will help you learn enough MicroPython to be able to write programs that run on the ESP32 microcontroller.

  3. If you have experience in programming the ESP32 with the Arduino IDE and language, but what to check out MicroPython, this course will help you do that.

What is MicroPython?

MicroPython is a programming language that borrows the syntax and language attributes of Python 3.

Python 3 is a powerful high-level general-purpose language that is designed to be easy to learn and use. It is extremely popular, and among the top-5 most widely used programming languages. As a result, has an extensive set of learning resources, excellent documentation, and code libraries that cover an amazing breadth of applications.

From gaming to the Internet of Things, from data science to industrial automation, anything that can be programmed in Python.

MicroPython was modelled after Python to reduce the barrier to entry for people that want to write programs for microcontrollers or embedded devices that have limited resources.

What is the ESP32?

The ESP32 is a powerful yet low-cost microcontroller device from Espresif.

The appeal of the ESP32 device is that it packs a powerful dual-core CPU, with relatively large amounts of RAM and flash storage, a full complement of wireless and wired communications options, with lots of input/output pins in a small low-cost package.

The ESP32 is also versatile, as you can program it with a variety of programming tools and languages, including the Arduino IDE, and, of course, MicroPython.

I selected the ESP32 as the hardware for this course because it is easy to find in the market, very affordable considering its capabilities, and, most likely, most people interested in microcontrollers already have at least one.

What are the objectives of this course?

This course has 3 main objectives:

  1. To introduce you to the MicroPython programming language, even if you have little or no prior experience.

  2. To help you learn how to use MicroPython with common external devices, like motors and screens, with MicroPython programs running on an ESP32 microcontroller.

  3. To consolidate this knowledge with the help of two capstone projects. In these projects, you will create a working gadget by combining the knowledge you acquired earlier in the course.

What are the knowledge prerequisites?

Before embarking on this course, please confirm that you tick the following boxes:

  1. You have a basic understanding of electronics. You are comfortable with assembling simple circuits on a breadboard, and you understand simple concepts like pull-up resistors and voltage dividers.

  2. You have a basic understanding of microcontrollers. For example, you know what is a GPIO, the I2C or SPI interfaces and PWM. You understand that if you connect a 3.3V device to a 5V power source, you will damage the device.

  3. You are familiar with related concepts, such as the Internet Of Things (which features in one of the course sections).

  4. You are comfortable with at least one programming language and programming tool. It doesn’t matter which ones, as all modern languages and programming share the same basics.

  5. You have a growth mindset, and you are willing to work hard in order to learn.

If you feel that you don’t tick one of these boxes, consider doing one of my introductory Arduino and Electronics courses first. Then you’ll be ready to come back to this course.

Course organization

This course is organised in four parts.

In the first part, you will learn the basics. This is where you’ll learn how to set up and use Thonny, our programming editor, and prepare your ESP32 to work with MicroPython.

You will also have the opportunity to learn the basics of MicroPython and where and how to find compatible libraries.

The second part is where you roll up your sleeves and write MicroPython programs. You’ll start with simple pin operations that make LEDs blink and read buttons, then move on to sensors, displays, and motors. There’s a large section dedicated to Wifi and Internet of Things applications, and another section dedicated to more advanced topics such as hardware timers, working with internal sensors, and sleep.

In the third and final part, you will consolidate your new knowledge with the help of two capstone projects. Both projects combine the same hardware components with one big difference in the software. While in the first project, all of the MicroPython code exists in the same file, in the second project I show you how to modularise the design and break up the code into two files.

Required software and hardware

For details on the required software and hardware, I have prepared two separate lectures in this section, which I invite you to watch next.

But, in summary:

  • For the software, you will the Thonny programming tool, and the MicroPython firmware for the ESP32. Both are open-source and free

  • For the hardware, you will need an ESP32 board, and an assortment of common components like LEDs, resistors, sensors and motors. It doesn’t matter which ESP32 board you have. As long as it is an ESP32, it will work with MicroPython.

If you have taken one of my Arduino courses, you probably already have everything you need.

For the details, please refer to the two lectures in this section where I go into the details for the required software and hardware.

Ok, what's next???

I hope that you now have a good understanding of what this course is about and what to expect ahead.

The first section contains several free lectures with more detailed information about the course. Feel free to watch them if you wish before enrolling.

Happy Learning.

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Learning objectives

  • The micropython programming language.
  • How to use micropython with the esp32 microcontroller.
  • How to use the thonny editor with micropython and the esp32.
  • How to use micropython with common peripherals such as motors, displays and sensors.
  • How to use micropython to write programs that work with iot services like ifttt.
  • How to search, find and install micropython libraries on the esp32.

Syllabus

Introduction
01.10 What is this course about?
01.20 What is uPython and why should you care?
01.30 Software you will need
Read more

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Uses MicroPython, which is based on Python 3, a popular language known for its extensive resources and ease of use, making it accessible to newcomers
Employs the ESP32 microcontroller, a versatile and cost-effective device with a dual-core CPU and various communication options, suitable for diverse projects
Requires a basic understanding of electronics concepts like circuits, resistors, and voltage dividers, which may necessitate prior learning for complete beginners
Assumes familiarity with microcontrollers and concepts like GPIO, I2C, SPI, and PWM, potentially requiring introductory coursework for those new to the field
Includes capstone projects that consolidate learning by creating working gadgets, providing practical experience in applying MicroPython with the ESP32
Covers interfacing with common peripherals like LEDs, sensors, displays, and motors, offering hands-on experience with essential components for embedded systems

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Practical micropython for esp32 projects

According to learners, this course offers a practical and hands-on introduction to using MicroPython with the ESP32. Students frequently praise the instructor's clear explanations and the course's focus on real-world projects and sensor integration. Many found it especially beneficial for beginners or those transitioning from other platforms like Arduino. The course is noted for being well-structured and updated to cover recent versions of tools like Thonny and MicroPython firmware, which is a positive aspect acknowledged in newer reviews. While some encountered minor setup hurdles depending on their specific hardware, the overall consensus is that the course provides a solid foundation and is a valuable resource for learning MicroPython on the ESP32.
Necessary to have specific components to follow along.
"You definitely need to gather the recommended hardware list to do the exercises."
"Make sure you have the ESP32 board and components handy before starting."
"Following the course requires purchasing a set of electronic parts."
Recent updates addressed software and firmware versions.
"The updates for Thonny 4 and MicroPython 1.18 were very helpful."
"Glad to see the course content is kept current with tool versions."
"Using the latest Thonny and firmware made following along much easier."
Well-suited for newcomers to MicroPython or ESP32.
"As a beginner, I found the pace and explanations perfect."
"Great introduction for someone with basic Python knowledge but new to hardware."
"Helped me get started with MicroPython on my ESP32 with minimal fuss."
Focus on practical application with diverse projects.
"I really enjoyed the projects; they helped solidify my learning."
"The course provides plenty of hands-on examples with sensors and displays."
"Working through the projects with different components was very useful."
The instructor's teaching style is highly praised.
"The instructor explains everything very clearly and step-by-step."
"His explanations are really easy to follow, even complex topics."
"I appreciated the clear and concise way the concepts were presented."
Some users faced issues with their specific boards.
"Had some trouble getting my specific ESP32 board to connect initially."
"Flashing the firmware took a couple of tries on my device."
"Encountered minor hardware compatibility issues, though solutions were often provided."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in MicroPython with the ESP32 with these activities:
Review Basic Electronics Concepts
Reinforce your understanding of basic electronics concepts like pull-up resistors and voltage dividers, which are essential for working with the ESP32 and external components.
Show steps
  • Review online resources explaining voltage dividers.
  • Practice calculating voltage and current in simple circuits.
  • Familiarize yourself with common electronic components.
Brush Up on Microcontroller Fundamentals
Revisit key microcontroller concepts like GPIO, I2C, SPI, and PWM to ensure a solid foundation for understanding how the ESP32 interacts with peripherals.
Browse courses on GPIO
Show steps
  • Review the definitions of GPIO, I2C, SPI, and PWM.
  • Research how these interfaces are used in embedded systems.
  • Study diagrams illustrating data transfer via I2C and SPI.
Read 'Programming the ESP32 with MicroPython'
Supplement your learning with a dedicated book on MicroPython and ESP32 to gain a deeper understanding of the platform and its capabilities.
Show steps
  • Obtain a copy of 'Programming the ESP32 with MicroPython'.
  • Read the chapters relevant to the course syllabus.
  • Experiment with the code examples provided in the book.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Practice Blinking LEDs with Different Methods
Reinforce your understanding of pin operations and timers by practicing different methods of blinking an LED using MicroPython on the ESP32.
Show steps
  • Write a MicroPython script to blink an LED using a loop.
  • Modify the script to use a hardware timer for blinking.
  • Experiment with different PWM values to fade the LED.
Build a Simple Weather Station
Apply your knowledge of sensors, displays, and Wi-Fi by building a weather station that displays temperature, humidity, and weather data from an online API.
Show steps
  • Connect a DHT22 sensor to the ESP32.
  • Display sensor readings on an OLED screen.
  • Fetch weather data from OpenWeatherMap API.
  • Display the weather data on the OLED screen.
Document Your Weather Station Project
Solidify your understanding and share your knowledge by creating a blog post or video tutorial documenting your weather station project.
Show steps
  • Take photos or videos of your weather station setup.
  • Write a detailed explanation of the project's components.
  • Describe the MicroPython code and its functionality.
  • Share your documentation online.
Contribute to a MicroPython Library
Deepen your understanding of MicroPython and the ESP32 by contributing to an open-source library related to the platform.
Show steps
  • Find a MicroPython library on GitHub.
  • Identify a bug or missing feature.
  • Submit a pull request with your fix or enhancement.

Career center

Learners who complete MicroPython with the ESP32 will develop knowledge and skills that may be useful to these careers:
Embedded Systems Engineer
An Embedded Systems Engineer designs, develops, and tests software and hardware for embedded systems. This role often requires working directly with microcontrollers, like the ESP32 featured in this course. The course helps build a foundation by providing hands-on experience using MicroPython to interact with hardware components, sensors, and displays. Learning how to program the ESP32, configure wireless communications, and implement system logic is essential experience for an Embedded Systems Engineer. For someone looking to enter this role, working through this course will help prepare them to work with various IoT applications.
Internet of Things Developer
An Internet of Things Developer creates software for interconnected devices, often incorporating microcontrollers and sensors. The curriculum of this course, with its focus on using MicroPython on the ESP32, directly applies to this role. The course covers wireless communication, sensor data acquisition, and control of physical devices. Experience with IoT services like IFTTT taught in the course is also highly relevant. An Internet of Things Developer should feel confident when creating systems for automation and connected devices, and this course may help build that confidence with practical, hands-on experience.
Maker
A Maker engages in hands-on projects that often combine electronics, programming, and physical fabrication. This course, with its focus on MicroPython with the ESP32, offers relevant skills for Makers looking to work with microcontrollers. The course covers how to control hardware such as motors, sensors, and displays, all things that might be integrated into a Maker project. For those who enjoy building creative solutions using technology, this course will give them the ability to work with the ESP32, a low cost and versatile microcontroller. This course may provide valuable knowledge for Makers.
Firmware Engineer
A Firmware Engineer develops low-level software that interacts directly with the hardware of a device. This often involves programming microcontrollers, and this course directly addresses that skill. Using MicroPython on the ESP32 to control peripherals, manage communication protocols, and handle sensor data, as taught by this course, are all skills highly relevant to this career. A Firmware Engineer needs to be fluent in working with embedded systems, and taking this course may help build that fluency. This course may also help those who have worked with the Arduino IDE, as it provides a transition to MicroPython.
Hobbyist Electronics Developer
A Hobbyist Electronics Developer creates unique electronic projects for personal enjoyment and learning. This course, which focuses on using MicroPython and the ESP32 microcontroller, is well-suited for someone who is passionate about making electronic devices. The course covers the fundamentals, like controlling LEDs, reading sensor data, and using wireless communication. Those who pursue this role learn how to combine skills in hardware and software. The capstone projects in the course also provide the experience of creating a personal device. This course may be particularly beneficial for enhancing the skills of a Hobbyist Electronics Developer.
Robotics Engineer
A Robotics Engineer designs, builds, and programs robots or robotic systems. This role often involves working with microcontroller-based systems, just like those taught in this course. This course, which offers an approach to low-level programming with MicroPython on the ESP32, helps build a foundation for understanding how to control robotic components. The course teaches how to use sensors, motors, and displays, all of which are common elements in robotics. If you are looking to enter the field of Robotics Engineering, this course may be beneficial for hands-on experience in controlling hardware using a popular programming language.
Control Systems Engineer
A Control Systems Engineer designs and implements systems that control dynamic processes. This role frequently involves using microcontrollers to manage real-time feedback loops. This course provides experience with programming the ESP32 using MicroPython. Learning how to handle timers, sensors, and actuators within a microcontroller environment, as this course offers, is helpful for someone looking to work as a Control Systems Engineer. Developing skills in low-level programming and working with hardware as well as controlling them, as offered in this course, may be a good supplement to one's work as a Control Systems Engineer.
Automation Engineer
An Automation Engineer designs systems that automate industrial or manufacturing processes. Working with microcontrollers and programming to control devices and read sensor data are key parts of this role. This course focuses on using MicroPython on the ESP32 microcontroller to achieve these goals. The course covers how to control motors, read sensor data, and create communication protocols. Therefore, this course may be helpful for an Automation Engineer who needs to create precise operations and measurements using microcontrollers. The skills gained from this course could help with building prototypes and custom solutions.
Research Assistant
A Research Assistant supports research projects in engineering and technology, often working with hardware and software. This course, focusing on MicroPython with the ESP32 microcontroller, provides practical skills in programming hardware. This experience in coding, testing, and using the ESP32 system is beneficial when assisting in research involving embedded systems, IoT, and related projects. Particularly the ability to modularize code, as shown in the course, can be valuable when conducting research. This course may be useful for Research Assistants looking to gain more practical programming experience with microcontrollers, as it is directly applicable to many research settings.
Test Engineer
A Test Engineer develops and executes test plans for electronic systems and software. To become a test engineer, it may be beneficial to have experience with the technologies being tested, such as the ESP32, which is the focus of this MicroPython-based course. This course provides practical experience in programming the ESP32 microcontroller, interacting with its various sensors and peripherals. Understanding how the device operates at a low level is advantageous when testing software and hardware. The experience with writing MicroPython code to control the ESP32 may be useful for a Test Engineer.
Hardware Engineer
A Hardware Engineer designs and tests the physical components of electronic devices. While this role focuses more on the physical aspects of hardware, understanding how software interfaces with hardware is crucial. This course provides that understanding with its specific use of MicroPython on the ESP32, giving a Hardware Engineer a better sense of how software integrates with hardware. Specifically, how to read and write from pins or interfaces is useful. This course introduces a Hardware Engineer to programming that may help them become more fluent in their work.
Educator
An Educator, such as a teacher or instructor, develops and delivers instruction in technology-related fields. This course, which teaches programming MicroPython on the ESP32 microcontroller, provides an Educator with practical knowledge of a contemporary programming language. This may help them teach complex concepts using a popular and widely available microcontroller. The experience gained in hardware and software using this course may be helpful for an Educator that wants to introduce embedded systems and IoT concepts. This course may directly apply to teaching these concepts at an introductory level.
Product Developer
A Product Developer is responsible for concepting, designing, and developing new products. This role often requires a basic understanding of various technologies including embedded systems, microcontrollers, and software. The hands-on experience gained through this course may be helpful to a Product Developer. The knowledge gained will allow for prototyping and experimentation with embedded devices. Specifically, learning how to use MicroPython on the ESP32 to control sensors and displays can be relevant for someone seeking to work as a Product Developer. This course may help a Product Developer understand the complexities of embedded systems.
Electronics Technician
An Electronics Technician builds, tests, and troubleshoots electronic equipment. While the course focuses on programming microcontrollers, familiarity with the ESP32 hardware and practical experience in connecting various components is very relevant for this position. This course offers practical skills in working with the ESP32 hardware and how to connect various hardware peripherals and sensors. The hands-on work in this course may help a learner troubleshoot issues specific to the ESP32. For an Electronics Technician, this course may improve their familiarity with the devices they will be working with.
Technical Consultant
A Technical Consultant advises clients on technical projects, often involving embedded systems and IoT. This course, which details the use of MicroPython on the ESP32, may be useful if the Technical Consultant needs to understand the technical details of an embedded system. The course covers key aspects such as microcontroller programming, sensor data acquisition, and wireless communication, which is useful for a Technical Consultant. This course may be especially helpful if the Technical Consultant wants to advise on projects that involve the ESP32 or the MicroPython language.

Reading list

We've selected one books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in MicroPython with the ESP32.
Provides a comprehensive guide to programming the ESP32 using MicroPython. It covers a wide range of topics, from basic setup to advanced concepts like networking and IoT. It serves as a valuable reference for understanding the intricacies of MicroPython on the ESP32 platform. This book is useful as a reference text and for expanding on the course materials.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser