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 →

Can’t Find Arduino M0 PRO or Zero in IDE

What to do when you can’t find Arduino M0 Pro or Zero in IDE board list. How to install Arduino M0, M0 Pro or Zero software in the Arduino IDE. Arduino boards are selected from the top Arduino IDE menu under Tools → Board, but if the Arduino M0, Arduino M0 PRO or Arduino Genuino Zero boards are not found on the menu, additional software must be installed within the Arduino IDE.

When the software is installed, the following boards will be supported by the Arduino IDE:

  • Arduino/Genuino Zero
  • Arduino/Genuino MKR1000
  • Arduino MKRZERO
  • Arduino MKR FOX 1200
  • Arduino MKR WAN 1300
  • Arduino MKR GSM 1400
  • Arduino M0 Pro
  • Arduino M0
  • Arduino Tian
  • Adafruit Circuit Playground Express

Can’t Find Arduino M0 PRO or Zero on the Menu in the Arduino Software

In the image below, the Arduino M0 Pro, Arduino M0 and Genuino Zero are missing from the Arduino IDE board list menu. The steps below show how to solve the problem and get the additional Arduino boards listed on the menu.

Can't Find Arduino M0 PRO or Zero in IDE - Arduino IDE Board List Missing M0 and Zero

Can’t Find Arduino M0 PRO or Zero in IDE – Arduino IDE Board List Missing M0 and Zero

How to Install Software for the Arduino M0, M0 Pro and Genuino Zero

The following screen captures show how to install software for the Arduino M0, M0 Pro and Genuino Zero boards in the Arduino IDE. Only one package must be installed for all three boards and is done within the Arduino IDE.

After installation, the following boards will be available in the Arduino IDE: Arduino/Genuino Zero, Arduino/Genuino MKR1000, Arduino MKRZERO, Arduino MKR FOX 1200, Arduino MKR WAN 1300, Arduino MKR GSM 1400, Arduino M0 Pro, Arduino M0, Arduino Tian and Adafruit Circuit Playground Express.

1. Open the Boards Manager

From the top Arduino IDE menu, select Tools → Board → Boards Manager… to open the Boards Manager dialog box.

Open the Arduino IDE Boards Manager

Open the Arduino IDE Boards Manager

2. Select Arduino SAMD Boards and Install

In the Boards Manager dialog box, type M0 into the search field to easily find the SAMD package for Cortex-M0+ boards as shown in the image below.

Search for M0 in the Boards Manager Dialog Box

Search for M0 in the Boards Manager Dialog Box

Click anywhere on the Arduino SAMD Boards (32-bits ARM Cortex-M0+) by Arduino item to select it. After selecting it, an Install button will appear as can be seen in the above image. Click the Install button to install the software package. This may take some time, depending on the speed of your Internet connection. Click the Close button in the dialog box after the installation has finished.

3. Find the Arduino Zero and M0 Boards on the Arduino IDE Menu

After the software package has been installed, the new Arduino boards can be seen on the Arduino IDE Board menu found under Tools →Board as shown in the image below.

A new section called Arduino SAMD (32-bits ARM Cortex-M0+) Boards can be seen on the Board menu which contains Arduino M0, M0 Pro, Zero, MKR boards and others.

Arduino M0 and Genuino Zero on the Arduino IDE Board List

Arduino M0 and Genuino Zero on the Arduino IDE Board List

Program the Arduino M0 Pro or Arduino Zero

Select the desired board from the Arduino IDE Board menu and then select the correct Port number from the menu item below Board on the Tools Menu. The Arduino board can now be programmed in the usual manner.

For Arduino boards such as the Zero and M0 that have two USB ports for programming, make sure that the correct board and port is selected from the Board menu – i.e. Programming Port or Native USB Port. This port name must correspond to the port on the board that the cable is plugged into.

For example, a Arduino M0 Pro board is shown below with the USB cable plugged into the programming port. Arduino M0 Pro (Programming Port) must therefore be selected from the Arduino IDE board menu.

Arduino M0 Pro Programming Port

Arduino M0 Pro Programming Port

 

Update to Arduino Programming Course

The Arduino programming course originally started in 2014 is being updated and extended. Updates include using the newest version of the Arduino IDE and updating the videos in the course to HD video.

Currently parts 1 to 5 of the course have been updated which cover Arduino sketch structure and flow, Arduino main loop, calling functions, variables, arithmetic operators and relational operators.

Once updates have been completed the course will be extended to include new material and topics. Take a look at the Arduino programming course contents page to see the currently available tutorial parts of the course.

 

Arduino MEGA Ethernet Web Server for Controlling 24 Outputs

In this tutorial, an Arduino MEGA 2560 and Ethernet shield are used to make a web server that hosts a web page that allows 24 outputs to be controlled using checkboxes. The tutorial on the Arduino MEGA web server contains the circuit diagram and all of the source code for the project.

This tutorial was written to answer a question on the blog about the Arduino web server tutorial.

An image of the web server with the web page used to control 24 LEDs is shown below.

24 Output Arduino MEGA Web Server using the Ethernet Shield

24 Output Arduino MEGA Web Server using the Ethernet Shield

How to Get a String or Number into the Arduino from the Serial Port

Arduino boards such as the Arduino Uno have a serial port that is linked to the USB port on the board. When data is sent out of the serial port in an Arduino sketch using a function such as Serial.print(), then the data goes out of the Atmel AVR microcontrollers (which is the main Arduino microcontroller) serial port to the small Atmel microcontroller on the board that handles the USB communications. This small microcontroller then sends the serial data out of the USB port.

The data that is sent out of the Arduino USB port can be displayed in the Serial Monitor window of the Arduino IDE as shown in the image below.

Opening the Arduino Serial Monitor window.

Opening the Arduino Serial Monitor window.

Data can also be sent from the Arduino IDE Serial Monitor window into the Arduino. Part 19 of the Arduino programming course shows how to send a character, string and number from the Arduino Serial Monitor window to the Arduino board.

A single character is easy enough to receive and process in an Arduino sketch. A string requires a bit more work because it must be assembled from the characters received via the serial port. A number is captured as a string and then must be converted from a series of characters into an actual number.

Go to the tutorial (part 19 of the Arduino programming course) to learn how to handle Arduino serial input →