This is the home page for a MicroPython Tutorial.
Here's the URL of the server:
Documentation#
The complete documentation for Python and MicroPython (as used on microcontrollers) is available here:
- Python documentation
- MicroPython documentation
- There is also a complete page on this wiki about MicroPython
Exercises#
- MicroPython Tutorial Exercise 1: main.py
- MicroPython Tutorial Exercise 2: blocks
- MicroPython Tutorial Exercise 3: functions
- MicroPython Tutorial Exercise 4: classes
- MicroPython Tutorial Exercise 5: using classes
Additional exercises:
Starting Point#
We begin with a main.py file (sometimes called a "script") defining a module called "main" and containing just a single comment line: main.py # do something intelligent here
The file main.py is special in MicroPython, in the sense that when you power-on the device and/or press the reset button, the main.py file is executed. It's the entry point for executing any application in Python.
Next: MicroPython Tutorial Exercise 2: blocks