docs/samd/tutorial/intro.rst
.. _samd_intro:
Using MicroPython is a great way to get the most of your SAMD board. And vice versa, the SAMD chip is a great platform for using MicroPython. This tutorial will guide you through setting up MicroPython, getting a prompt, using the hardware peripherals, and controlling some external components.
Let's get started!
The first thing you need is a board with an SAMD chip. The MicroPython software supports the SAMD chip itself and any board should work. The main characteristic of a board is how the GPIO pins are connected to the outside world, and whether it includes a built-in USB-serial converter to make the UART available to your PC.
Names of pins will be given in this tutorial using the board names ("D0") and it should be straightforward to find which pin this corresponds to on your particular board.
If your board has a USB connector on it then most likely it is powered through this when connected to your PC. Otherwise you will need to power it directly. Please refer to the documentation for your board for further details.
Firmware versions are provided at the
MicroPython download page <https://micropython.org/download/?port=samd>_.
You can download the most recent MicroPython firmware .uf2 file to load
onto your SAMD device. From that download page you have two main choices:
If you are just starting with MicroPython, the best bet is to go for the stable firmware builds. If you are an advanced, experienced MicroPython SAMD user who would like to follow development closely and help with testing new features, there are daily builds. They run through the same rigid internal test sequence as the stable builds, but the firmware features may change.
Once you have the MicroPython firmware you need to load it onto your SAMD device. Most of the boards support the following easy procedure for firmware upload.
Once you have the firmware on the device you can access the REPL (Python prompt) over USB.
From there you can follow the SAMD tutorial.
If you experience problems during flashing or with running firmware immediately after it, here are some troubleshooting recommendations: