There's a lot of ways to power the Metro M0 Express, and a lot of ways to get power out as well. The two primary ways to power the Metro:
Micro USB port provides 5V at 500mA or so, there is a fuse that will shut off temporarily when more than 1000mA is drawn, this is to protect a computer USB port. You can plug this into any computer or USB charger with USB cable. You can draw up to 500mA between the Vin, 5V, and 3.3V supplies (combined).
DC jack is a 5.5mm/2.1mm center-positive DC connector, which is the most common available. Provide about 6-12V here to power the Metro. There is no fuse on this connection so you can draw more current, up to 800mA between the 5V and 3.3V supplies, and 2A from Vin
Onboard regulators take the USB or DC power and linearly convert it to 3.3V and 5V:
3.3V -- this is the output from the 3.3V regulator; it can supply 500mA peak
5V -- this is the output from the 5V regulator (when DC jack is used), or from USB. It can supply ~500mA peak from USB and ~800mA peak from DC
GND -- this is the common ground for all power and logic
Vin -- this is the higher of the DC jack or USB voltage. So if the DC jack is plugged in and 9V, Vin is 9V. If only USB is connected, this will be 5V.
There is also an ON/OFF switch. This switch is only for the DC jack and does not affect powering via USB.
Digital I/O: D0-13 are GPIO (General Purpose Input/Output) pins. If there is a dot next to the pad, it can act as a PWM output. Additionally, A1-A5 are each analog input as well as digital I/O pins.
Analog inputs: In addition to A0-A5 pins, there are extra analog inputs available at Digital #0, 1, 4, 5, 8, 9. As you will see in the code, these pins are available in CircuitPython under the board module, named with prefix D as board.D0, for instance.
Analog I/O: A0 pin is analog input but also an analog output due to having a DAC (digital-to-analog converter). You can set the raw voltage to anything from 0 to 3.3V, unlike PWM outputs this is a true analog output.
SCK/MOSI/MISO: These are the hardware SPI pins. They are connected to the 2x3 header on the right hand side. You can use them as everyday GPIO pins. But it is recommended keeping them free as they are best used for hardware SPI connections for high speed.
As part of the 'Express' series of boards, the Metro M0 Express is designed for use with CircuitPython. To make that easy, we have added two extra parts to this Metro M0: a mini NeoPixel (RGB LED) and a 2 MB SPI Flash chip
The NeoPixel is connected to pin #40 in Arduino, so just use our NeoPixel library and set it up as a single-LED strand on pin 40. In CircuitPython, the NeoPixel is board.NEOPIXEL and the library for it is here and in the bundle. The NeoPixel is powered by the 3.3V power supply but that hasn't shown to make a big difference in brightness or color. The NeoPixel is also used by the bootloader to let you know if the device has enumerated correctly (green) or USB failure (red). In CircuitPython, the LED is used to indicate the runtime status.
The SPI Flash is connected to 4 pins that are not brought out on the GPIO pads. This way you don't have to worry about the SPI flash colliding with other devices on the main SPI connection. Under Arduino, the FLASH SCK pin is #38, MISO is #36, MOSI is #37, and CS is #39. If you use Metro M0 Express as your board type, you'll be able to access the Flash SPI port under SPI1 - this is a fully new hardware SPI device separate from the GPIO pins on the outside edge of the Feather. In CircuitPython, the SPI flash is used natively by the interpretter and is read-only to user code, instead the Flash just shows up as the writeable disk drive!
Click here to see the information above and other details on Adafruit's official website.
The microcontroller on this board runs at 3.3V logic (unlike most other Arduino/ATMEGA based boards).
For more details, see Arduino Zero Guide (which uses the same chip as the Metro M0 Express).
The circuits in these tutorials will account for this. Make sure to follow the circuit diagrams carefully. In general, we will be using the 3.3V pin (instead of the 5V pin) to supply power to the circuits.
When you save new code onto the board, it will automatically restart and re-run the code.
The reset button restarts the board, which means it removes the CIRCUITPY drive and then brings it back after a few seconds (similar to unplugging and replugging in the board).
Once you eject the CIRCUITPY drive and unplug the board from your computer, you can use an external power source (7-9V DC or 5V USB) to run the code that is saved on the board.
It is always good to have a back up copy of your code, especially in case you ever have to erase and reformat the board.
You can save a copy of your code files in a folder on your computer.
The board will only run the code in code.py.
You can save your code for the challenges in separate files and then copy the code you want to run into code.py.
Next to the DC jack, there is a switch to turn the power on or off.
The board will automatically switch between USB and DC power, but in general, only use one or the other.