Adafruit Feather M0
Support for the Adafruit Feather M0.
General information
Section titled “General information”Feather M0 boards are development boards shipped by Adafruit.
All the feather M0 boards are built based on the same Atmel SAMD21G18A microcontroller. See Atmel SAMD10/SAMD20/SAMD21/SAMR21.
Several types of Feather M0 boards exist:
The different modules used to differentiate the boards (ATWINC1500 WiFi,
Bluefruit LE, SD card, LoRa) are connected via SPI (SPI_DEV(0)) to the
SAMD21 mcu.
Pinout
Section titled “Pinout”
AIN7 can be used to measure the voltage of a connected Lipoly battery.
It is mapped to ADC_LINE(6) in RIOT.
int vbat = adc_sample(ADC_LINE(6), ADC_RES_10BIT);vbat *= 2; /* voltage was divided by 2, so multiply it back */vbat *= 33; /* reference voltage 3.3V * 10 */vbat /= 10240; /* resolution * 10 (because we multiplied 3.3V by 10) */printf("Bat: %dV\n", vbat);Flash the board
Section titled “Flash the board”Use BOARD=feather-m0 with the make command.
Example with hello-world application:
make BOARD=feather-m0 -C examples/basic/hello-world flashUsing the WiFi interface
Section titled “Using the WiFi interface”To enable the WiFi interface of the Feather M0 WiFi variant of the board
automatically for networking applications, use feather-m0-wifi as board
and define the required WiFi parameters, for example:
CFLAGS='-DWIFI_SSID=\"<ssid>\" -DWIFI_PASS=\"<pass>\"' \make BOARD=feather-m0-wifi -C examples/networking/gnrc/networkingFor detailed information about the parameters, see section ATWINC15x0 WiFi module driver.
Using with LoRa module
Section titled “Using with LoRa module”To enable the LoRa module available on the
Feather M0 LoRa
variant of the board automatically for LoRa applications,
use feather-m0-lora as board:
make BOARD=feather-m0-lora -C examples/networking/gnrc/lorawanFor detailed information about the parameters, see section Semtech SX1272 and SX1276 radios driver.
Accessing STDIO via UART
Section titled “Accessing STDIO via UART”STDIO of RIOT is directly available over the USB port.
The TERM_DELAY environment variable can be used to add a delay (in second)
before opening the serial terminal. The default value is 2s which should be
enough in most of the situation.