

The SAMD21 WeMos D1 SAMD21 M0 is a microcontroller development board based on the Atmel/Microchip SAMD21 ARM Cortex-M0+ 32-bit processor. It is designed to be compatible with the Arduino UNO R3 form factor, making it an excellent choice for users who want to leverage the power of a 32-bit ARM processor while maintaining compatibility with Arduino shields and libraries.
This board is ideal for applications requiring low power consumption, high performance, and compatibility with Arduino IDE. It is commonly used in IoT projects, robotics, data logging, and other embedded systems.








The SAMD21 WeMos D1 SAMD21 M0 has a pinout similar to the Arduino UNO R3. Below is a table describing the pin configuration:
| Pin | Function | Description |
|---|---|---|
| D0 | RX | UART Receive Pin |
| D1 | TX | UART Transmit Pin |
| D2-D13 | Digital I/O | General-purpose digital input/output pins |
| D3, D5, D6, D9, D10, D11 | PWM | Digital pins with PWM capability |
| A0-A5 | Analog Input | Analog input pins (10-bit resolution) |
| VIN | Voltage Input | External power input (7-12V recommended) |
| 3.3V | 3.3V Output | Regulated 3.3V output |
| 5V | 5V Output | Regulated 5V output |
| GND | Ground | Ground pins |
| RESET | Reset | Resets the microcontroller |
| ICSP | SPI Interface | SPI communication pins (MISO, MOSI, SCK) |
| USB | USB Interface | Native USB for programming and communication |
Powering the Board:
Programming:
File > Preferences.https://www.arduino.cc/en/Guide/CoresTools > Board > Boards Manager, search for "SAMD" and install the package.Tools > Board > Arduino SAMD (32-bits ARM Cortex-M0+) Boards > Arduino Zero (Native USB Port).Tools > Port.Connecting Components:
Uploading Code:
The following example demonstrates how to blink an LED connected to pin D13:
// Define the LED pin
const int ledPin = 13;
void setup() {
// Set the LED pin as an output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Turn the LED on
digitalWrite(ledPin, HIGH);
delay(1000); // Wait for 1 second
// Turn the LED off
digitalWrite(ledPin, LOW);
delay(1000); // Wait for 1 second
}
The board is not detected by the Arduino IDE:
Code upload fails:
Connected components are not working:
Q: Can I use 5V sensors with this board?
A: The SAMD21 operates at 3.3V logic levels. Use a level shifter or voltage divider to interface with 5V sensors.
Q: How do I reset the board?
A: Press the reset button on the board. For bootloader mode, double-tap the reset button.
Q: Is the board compatible with Arduino shields?
A: Yes, the board is designed to be compatible with Arduino UNO R3 shields, but ensure the shield operates at 3.3V.
Q: Can I use the board for low-power applications?
A: Yes, the SAMD21 is optimized for low-power operation, making it suitable for battery-powered projects.