Programming the ESP32 in MicroPython, 2nd Edition:

ESP32, ESP32 S3, Arduino Nano ESP32

First edition support

Errata

Program Listings

Resources 

ESP32Python2e360

 

Buy from: Amazon

New in this edition is support for the ESP32 S3 and the Arduino Nano ESP32.
The ESP32 is a remarkable device. It is low cost but with many different subsystems that make it more powerful than you might think. You can use it for simple applications because it is cheap, but you can also use it for more sophisticated applications because it is capable.
MicroPython is a good choice of language to program the ESP32. Although it is a slower language than C, most of the time this doesn’t matter and it is much easier to use. As a high-level language, MicroPython is based on Python 3 and is fully object-oriented. In general, you can take an existing Python 3 program and simply run it under MicroPython. If there are any changes to make, they are generally minor.
Another good thing about MicroPython on the ESP32 is that it is very easy to get started. After a simple installation procedure you have a working MicroPython machine which you can program almost at once using the Thonny IDE or PyCharm which has more extensive syntax checking and input prompting.
The purpose of the book is to reveal what you can do with the ESP's GPIO lines together with widely used sensors, servos and motors and ADCs. After covering the GPIO, outputs and inputs, events and interrupts, it gives you hands-on experience of PWM (Pulse Width Modulation), the SPI bus, the I2C bus and the 1-Wire bus. We also cover direct access to the hardware, adding an SD Card reader, sleep states to save power, the RTC, RMT and touch sensors, not to mention how to use WiFi.

Jointly authored by Harry Fairhead and Mike James, this book combines Harry’s expertise in electronics and the IoT with Mike’s knowledge of Python. Their other collaborations include Programming the Raspberry Pi Pico/W in MicroPython, Raspberry Pi IoT In Python Using GPIO Zero and Raspberry Pi IoT In Python Using Linux Drivers.

Harry Fairhead is the author of Programming the ESP32 in C Using the Arduino LibraryProgramming the ESP32 in C Using the Espressif IDF and the C language counterparts of books on the Raspberry Pi and the Pico. He is also the author of Fundamental C: Getting Closer To The Machine and Applying C For The IoT With Linux.

Mike James is the author of the Programmer's Python: Something Completely Different series of books and several other programming and computer science titles in the I Programmer Library.
 
 Paperback 
  • Publisher ‏ : ‎ I/O Press (June 19, 2023)
  •  Language ‏ : ‎ English
  •  ISBN-10 ‏ : ‎ 187196282X
  •  ISBN-13 ‏ : ‎ 978-1871962826 
  •  Item Weight ‏ : ‎ 1.7 pounds 
  •  Dimensions ‏ : ‎ 7 x 0.8 x 10 inches

Kindle 

  • ASIN ‏ : ‎ B0DSSVDV76
  • Publisher ‏ : ‎ I/O Press; 2nd edition (January 10, 2025)
  • Publication date ‏ : ‎ January 10, 2025
  • Language ‏ : ‎ English
  • File size ‏ : ‎ 8525 KB

Hardback

  • Publisher ‏ : ‎ I/O Press (June 20, 2023)
  • Language ‏ : ‎ English 
  • Hardcover ‏ : ‎ 355 pages 
  • ISBN-10 ‏ : ‎ 1871962099 
  • ISBN-13 ‏ : ‎ 978-1871962093 
  • Item Weight ‏ : ‎ 1.7 pounds 
  • Dimensions ‏ : ‎ 7 x 0.99 x 10 inches