Foreword
Preface
Conventions Used in This Book
Using Code Examples
O’Reilly Safari
How to Contact Us
Acknowledgments
1. What Is MicroPython?
Why Micro?
Why Python?
MicroPython Genesis
Dive In!
2. PyBoard
The Hardware
Developer Setup
3. BBC micro:bit
The Hardware
Developer Setup
4. Adafruit Circuit Playground Express
The Hardware
Developer Setup
5. ESP8266 / ESP32
The Hardware
Developer Setup
ESP8266
ESP32
6. Thinking Embedded
Human Drives
Abilities of Enchantment
Steps on the Ladder of Enchantment
7. Visual Feedback
Blinkenlights
NeoPixels (Blinkenlights on Steroids)
Text, Images, and Animation
PyBoard Colour LCD Display
8. Input and Sensing
Buttons and Capacitative Touch
Accelerometers, Gestures, and Compasses
Sound, Light, and Temperature
Sensing with Peripherals
9. GPIO
Pins
UART
SPI
I2C
Miscellaneous GPIO Techniques and Protocols
10. Networking
Circuit Playground Express Infrared
The micro:bit Radio
ESP8266/32 WiFi
MQTT
11. Sound and Music
Bleeps and Bloops
Music
Speech
12. Robots
Trundle Bot
Racer Bot
13. Idiomatic MicroPython
The Zen of MicroPython
Memory
Performance
14. Next Steps
The Community
Going Deeper
Index
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.