EmbeddedRelated.com
Books

Python for Microcontrollers: Getting Started with MicroPython

Norris, Donald 2016

Program Your Own MicroPython projects with ease―no prior programming experience necessary! 

This DIY guide provides a practical introduction to microcontroller programming with MicroPython. Written by an experienced electronics hobbyist, Python for Microcontrollers: Getting Started with MicroPython features eight start-to-finish projects that clearly demonstrate each technique. You will learn how to use sensors, store data, control motors and other devices, and work with expansion boards. From there, you’ll discover how to design, build, and program all kinds of entertaining and practical projects of your own.

• Learn MicroPython and object-oriented programming basics
• Explore the powerful features of the Pyboard, ESP8266, and WiPy 
• Interface with a PC and load files, programs, and modules 
• Work with the LEDs, timers, and converters
• Control external devices using serial interfaces and PWM
• Build and program a let ball detector using the 3-axis accelerometer
• Install and program LCD and touchsensor expansion boards
• Record and play sounds using the AMP audio board



Why Read This Book

You will learn how to program real microcontroller projects with MicroPython using clear, hands‑on examples and no prior programming background required. The book’s project‑first approach teaches you how to connect sensors, control motors, store data, and add networked features so you can build useful IoT and embedded prototypes quickly.

Who Will Benefit

Hobbyists, makers, educators, and engineers new to embedded development who want a friendly, project‑based introduction to MicroPython and microcontroller hardware.

Level: Beginner — Prerequisites: Basic computer literacy and comfort installing software; some familiarity with breadboards and basic electronics is helpful but not required.

Get This Book

Key Takeaways

  • Set up MicroPython on a microcontroller and use the REPL to interactively test code
  • Read data from common sensors (temperature, light, accelerometers) and process sensor inputs
  • Control actuators such as LEDs, servos, and DC motors and manage GPIO reliably
  • Log and persist data to local storage (SD card, flash) and format simple datasets
  • Add basic networking/IoT features (Wi‑Fi, HTTP requests) to send or receive data
  • Organize project code, debug common issues, and deploy standalone MicroPython applications

Topics Covered

  1. Introduction to MicroPython and the microcontroller ecosystem
  2. Getting your tools and flashing MicroPython firmware
  3. The MicroPython REPL and basic language essentials
  4. Digital I/O: LEDs, buttons, and debouncing
  5. Analog I/O and sensor interfacing
  6. Motors, servos, and driver circuits
  7. Data logging and storage options
  8. Displays and user feedback (OLED, LCD)
  9. Networking and simple IoT projects (Wi‑Fi, HTTP)
  10. Working with expansion boards and shields
  11. Power management and project packaging
  12. Putting projects together: eight start‑to‑finish builds
  13. Troubleshooting, best practices, and next steps

Languages, Platforms & Tools

MicroPythonPython (reference/CPython)PyboardESP8266ESP32Adafruit boards (CircuitPython-compatible)BBC micro:bitSerial REPL (screen, PuTTY, minicom)Thonny or other simple editorsesptool / firmware flashing utilitiesampy / rshell for file transferMultimeter and breadboard prototyping tools

How It Compares

More project‑focused and beginner‑friendly than Nicholas Tollervey's Getting Started with MicroPython, and less recipe‑centric than the MicroPython Cookbook (Packt); Norris emphasizes step‑by‑step projects for makers.

Related Books