Wemos SAMD21 M0 Arduino M0 Compatible Board

An Arduino M0 compatible board called Wemos SAMD21 M0 is available from several online shops such as Banggood, AliExpress and Amazon, and also appears from several sellers on eBay. What appears to be the same board is also marketed as RobotDyn SAMD21M0. This blog post provides more information on the board.

An image of the Wemos SAMD21 M0 is shown below. As can be seen in the image, the Wemos logo appears on the board near the SAMD21G18A microcontroller chip. This board is not an exact copy or clone of the Arduino M0, but has a few differences such as the extra TXD and RXD pins found at the end of the board.

WeMos SAMD21 M0 Arduino M0 Compatible

WeMos SAMD21 M0 Arduino M0 Compatible

Wemos SAMD21 M0 Board Logo

Apparently this board is not actually made by the Wemos company, but the board is silk-screened with the Wemos logo. This has been mentioned on the Arduino forum in a few places. Here are a couple of examples:

Arduino forum message mentioning that the Wemos board does not appear on the official Wemos website.

An Arduino forum user mentions that Wemos does not admit the existence of this board.

Arduino M0 Compatible

The Wemos SAMD21 M0 board is compatible with the Arduino M0 which was originally from arduino.org when arduino.org and arduino.cc were having their fight. Now that the two companies have finished fighting and merged back together, the Arduino M0 board is listed on the arduino.cc website.

Circuit Diagram

I have not found a circuit diagram for the Wemos SAMD21 M0 after extensive searching. As the board is compatible with the Arduino M0, the Arduino M0 information page will be useful. A circuit diagram or schematic for the Arduino M0 can be found under the DOCUMENTATION tab on this page.

Wrong Information

On many of the sellers web pages for the Wemos SAMD21 M0, there is incorrect information about the board that describes it as an Arduino Zero or Arduino M0 Pro. The information also mentions that it has Atmel’s embedded debugger (EDBG) on the board – this is not true. Only the Genuino Zero and Arduino M0 Pro have the EDBG.

Older Boards

Some users of earlier boards complained about the power LED being too bright. There were also complaints about the board not working with the Arduino IDE. This has changed with the newer boards. I have not had these problems with boards ordered in 2018.

Hardware Differences

Although the Wemos SAMD21 M0 board is compatible with the Arduino M0, it is not a clone or exact copy of the Arduino M0, but rather a variant of it.

Two extra serial port pins can be seen at the end of the board. These pins are labeled TXD and RXD. The power supply looks different between the boards and some of the components such as LEDs are in slightly different locations on the boards.

Wemos SAMD21 M0 Quick Start Tutorial

A Wemos SAMD21 M0 quick start tutorial can be found on the Starting Electronics website. This tutorial shows how to install the programming tools to program the Arduino M0 and compatible boards in the Arduino IDE. It shows how to blink the on-board LED as a quick test to see that the board is working and then shows how to use the serial ports to communicate with the Arduino IDE Serial Monitor.

Go to the Wemos SAMD21 M0 tutorial →

Installing Arduino Software and Drivers in Windows 10

There are some choices to be made when installing Arduino software and drivers in Windows 10. Arduino offer two ways of installing the Arduino IDE on a Windows PC — Windows installer file and a Windows zip file. Windows 10 will also install a default driver when an Arduino is plugged into the USB port of a PC. This driver can be replaced by the Arduino driver that comes with the Arduino software.

Arduino Software and Drivers

Installing Arduino software using the Windows zip file is the simplest method of installing the software. It is just a matter of copying the folder out of the downloaded zip file into the desired location on the PC. This allows the software to easily be removed by deleting the folder.

When Windows 10 installs a driver automatically, the Arduino just looks like a COM port in Windows Device Manager. It is not recognized as an Arduino, although it will work properly and code from the Arduino IDE can be loaded to it. After installing the Arduino driver that comes with the Arduino software, the Arduino will be shown as an Arduino on a COM port in Device Manager. The difference is shown in the image below.

Windows Default COM Driver and Arduino Driver

Windows Default COM Driver and Arduino Driver

As can be seen in the image, with the default Windows 10 driver installed, the Arduino appears as USB Serial Device (COM4) (left), but after the Arduino driver is installed the same Arduino appears as Arduino Uno (COM4) (right).

Full instructions on installing the Arduino IDE software and updating the Arduino driver can be found in the article on how to install Arduino software and drivers on Windows 10.

Arduino Programming: Passing a value to and Returning a Value from a Function

Two new sections have been added to the Arduino Programming Course. The course now looks at how to write a function, pass a value to a function and return a value from a function.

These new parts are available on the Starting Electronics website:

Functions and passing a value to a function looks at the structure of a function, how to write a function and how to pass a value to a function.

Returning a value from a function shows how to return a value from a function and uses an example of calculating the area of a circle by passing the radius of the circle to the function.

Arduino IDE Software Version 1.0.6 Now Available

Arduino software version 1.0.6 is now available at the download section of the Arduino website.

The following changes in version 1.0.6 of the software are from the release notes:

ARDUINO 1.0.6 - 2014.09.16

* avr: Improved USB-CDC write speed (Justin Rajewski)
* avr: Improved USB-CDC read code (Paul Brook)
* avr: Fixed race condition in USB-CDC transmit (Paul Brook)
* avr: Added replacement stub for cstdlib atexit() funciton
  (Christopher Andrews)
* Fixed wrong NULL pointer handling in Stream class
  (Amulya Kumar Sahoo)
* Backported String class from IDE 1.5.x (Matt Jenkins)
* Backported Print class from IDE 1.5.x
* Backported digitalPinToInterrupt macro from IDE 1.5.x
* Added initVariant() hook to allow 3rd party variant-specific
* Added replacement stub for cstdlib atexit() function
  (Christopher Andrews)

* Added compatibility for IDE 1.5.x libraries layout
* Fix toolchain command line to compile assembler files
  (Jimmy Hedman)
* If two libraries have the same header file use the lib with
  the same folder name (Paul Stoffregen)

* Robot_Control: removed duplicated SPI and Wire (Xun Yang)
* Robot_Control: fixed issue on motors being opposite (Xun Yang)
* Robot_Control: updated turning algorithm (Xun Yang)
* Esplora: added reading form Tinkerkit inputs
* SoftwareSerial: Fix idle level when initializing with inverted
  logic (Jens-Christian Skibakk)
* fixed a bunch of examples

* Wifishield: fixed paths on firmware upgrade scripts