Getting Started

Want to write your own mpy program?  It’s easy!

     You will need to decide which project you want to do, or invent your own project, or modify an existing one. Visit the mpy projects pages here for some ideas. To help you understand the electronics part of a mpy project you can go to the Hardware Getting Started pages.

     Whether you write your own mpy program from scratch or modify an existing program you will need to understand the mpy language rules.  The mpy language mainly follows the Python syntax rules.  Once you have the mpy software installed it will take take about an hour to go through these Getting Started pages and will depend how new you are to programming.  Don’t worry if you don’t finish it in one go, you can always come back to where you left off.

1. First Steps
2. blinky.mpy Explained
3. Hello World
4. Spaces are Important!

5. Variables
6. Arithmetic

7. if Statements
8. Loops
9. Inputs and Outputs
10. def Functions

(The mpy language is a cut down version of Python. If you want to learn more about Python take a look at this book.)