Skip to content

About This Book

This interactive intelligent book contains comprehensive educational resources for learning MicroPython and physical computing with microcontrollers. Designed for students aged 10-18 but suitable for all ages, it provides hands-on programming experiences with real hardware including the Raspberry Pi Pico, the Raspberry Pi Pico W (wireless), the ESP32, sensors, displays, motors, and more. It is designed to be used as a standalone tool for individuals learning MicroPython on their own or as a tool that can be used in conjunction with AI tools like ChatGPT, Anthropic Claude, Cursor, Windsurf or other AI-powered agentic IDEs.

Background

This book was originally created by Dan McCreary when he was a mentor at the local CoderDojo coding club in Minneapolis Minnesota. Although he had been teaching physical computing with Arduino for many years, he longed to migrate his courses to MicroPython. Many of his students already knew Python syntax and did not want to learn the C-language syntax used in Arduino projects. The biggest challenge was that most of the Arduino Uno hardware only had 2K of RAM. In order to run on a microcontroller, the MicroPython runtime needed 16K of RAM. The other problem was that the only microcontrollers that ran MicroPython were very expensive and they did not have high quality instructional content on-line.

This all changed in March 2021 when the Raspberry Pi Foundation announced the Raspberry Pi Pico. This was a low-cost ($4 USD) system that came with 264K or RAM. This was more than enough RAM to run MicroPython.

Goals of This Book

You might think we were crazy to put so much effort into build such a large collection of MicroPython code with many working examples. These examples represent literally thousands of person-hours designing, building and testing these MicroPython projects. But let me pause to explain. We really needed a fun way to get our students to think better. We needed a fun way to teach computational thinking.

What is Computational Thinking?

Computational thinking is a problem-solving approach that involves breaking down complex problems into smaller, more manageable parts using fundamental concepts from computer science. It encompasses four key components:

  1. Decomposition - Breaking problems into smaller, more manageable parts
  2. Pattern Recognition - Identifying similarities or patterns among problems
  3. Abstraction - Focusing on important information while ignoring irrelevant details
  4. Algorithm Design - Developing step-by-step solutions that can be understood by both humans and computers

For example: When creating a MicroPython project to monitor room temperature, computational thinking would involve:

  • Decomposing the task into reading sensor data, processing measurements, and displaying results
  • Recognizing patterns in temperature changes over time
  • Abstracting away hardware-specific details into configuration files
  • Designing algorithms to convert raw sensor data into meaningful temperature readings

What we wanted was to create the funnest way we could think of to teach computational thinking. What we did not want was slow, boring lectures and walls of long text reading. We wanted a fun hands-on way to teach computation thinking. We think that the Learning MicroPython is the best way we have found to make learning how to think fun.

Project-Based Learning

At the core our our approach is to get students to build something they can hold in their hands. Projects need to have switchers, buttons, knobs, lights and displays that are fun for kids to build and to play with. Our focus is a direct-hands on experience. The closer you are to the machine, the faster you will see the results. This short-feedback loop is critical to a high velocity of learning.

  1. Computer Science with Python
  2. Beginning Electronics
  3. Moving Rainbow
  4. STEM Robots
  5. Circuits
  6. Robot Day
  7. Python
  8. Spectrum Analyzer

Summary

Putting MicroPython at the core of your STEM education can help your students transform the way they learn and sharpen their curiosity. We sincerely hope you have as much fun as we had building this on-line resources.

Dan McCreary - Aug. 2025

Content License

All content on this website is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0. This means you may use the content for free in your classrooms and adapt it to meet your needs — as long as you preserve the attribution and license. You may not charge students additional fees for the content or resell it.

Contributing

We invite students, teachers, and mentors to help improve this website.

Git pull requests — If you are comfortable with Git, submit a Pull Request on GitHub. This is the preferred approach.

GitHub Issues — Open a new Issue and paste your content in Markdown. Note where any images or videos are stored.

Other formats — If Markdown is unfamiliar, send content as a Word document, PowerPoint, or Google Doc and a volunteer will convert it. Please use original content and avoid images you did not create yourself.

Questions and Discussion

Use GitHub Discussions as your first stop for questions about the course or the hardware.