Getting Started with the Arduino MKRZero
The Arduino MKRZero is a learning and development board which contains the ATMEL SAMD21 micro controller, designed to integrate the core's low power-consumption and high performance with the Arduino's ease-of-use. The MKRZero brings the Arduino Zero functionalities in the smaller form factor established by the Arduino MKR1000.
The Arduino MKRZero is programmed using the Arduino Software (IDE), our Integrated Development Environment common to all our boards and running both online and offline. For more information on how to get started with the Arduino Software visit the Getting Started page.
Please remove the black conductive foam from the MKR board pins before usage. If you don't remove it, the board may behave erratcally.
Use your Arduino MKRZero on the Arduino Web IDE
All Arduino boards, including this one, work out-of-the-box on the Arduino Web Editor, you only need to install Arduino Create Agent to get started.
The Arduino Web Editor is hosted online, therefore it will always be up-to-date with the latest features and support for all boards. Follow this simple guide to start coding on the browser and upload your sketches onto your board.
Use your Arduino MKRZero on the Arduino Desktop IDE
If you want to program your MKRZero while offline you need to install the Arduino Desktop IDE and add the Atmel SAMD Core to it. This simple procedure is done selecting Tools menu, then Boards and last Boards Manager, as documented in the Arduino Boards Manager page.
Here you can search Zero or MKRZero to find the core. Click on its box and click on the install button. On the bottom bar of the window you can follow the download and install procedure, including the installation of the proper driver, needed by the operating system to use the MKRZero board. For more information about cores, see the guide on installing additional Arduino cores.
Now that the SAMD Core is installed, you can connect the board to the computer using a standard USB cable. The very first time your computer may go through the new hardware installation process.
Select your board type and port
From Tools select the Board Arduino MKRZero
and then the Port that is labeled with the same name.
Open your first sketch
Go to File on the Arduino Software (IDE) and open the Examples tree; select 01. Basic and then Blink
This sketch just flashes the built in LED connected to Digital pin LED_BUILTIN at one second pace for on and off, but it is very useful to practice the loading of a sketch into the Arduino Software (IDE) and the Upload to the connected board.
Upload the program
Press the second round icon from left on the top bar of the Arduino Software (IDE) or press Ctrl+U or select the menu Sketch and then Upload.
The sketch will be compiled and then uploaded. After a few seconds the bottom bar should show Done Uploading.
You have successfully set up your MKRZero board and uploaded your first sketch. You are ready to move on with our tutorials and projects: choose your next destination below.
Tutorials
Now that you have set up and programmed your MKRZero board, you may find inspiration in our Project Hub tutorial platform.
Here a list of tutorials that will help you in making very cool things!
Simple Audio Player RTC Adding mores Serial interfaces to SAMD microcontrollers
More examples on the following library pages:
Scheduler - Manage multiple non-blocking tasks.
AudioFrequencyMeter - Sample an audio signal and get its frequency back
AudioZero - Play audio files from a SD card.
RTC - Real Time Clock to schedule events.
I2S - To connect digital audio devices together
Please Read...
In this section we have collected some information that is worth reading to use your MKRZero board properly. Some behaviours differ from the Uno board and if you come from a former experience with that board, it is worth spending a few minutes reading through these notes. If this is your first board, we suggest you have a look at them anyway.
Operating Voltage
The microcontroller on the MKRZero runs at 3.3V. Applying more than 3.3V on any pin will damage the board.
Serial ports on the MKRZero
The MKRZero has a number of facilities for communicating with a computer or other microcontrollers.
The USB connector exposes as a virtual serial port that can be controlled by writing and reading to the Serial object. Pins 13/14, instead, expose a Hardware serial port mapped to Serial1 object.
Opening and closing the USB Serial port at a baud rate other than 1200bps will not reset the 101. To use the serial monitor, and see what your sketch does from the beginning, you'll need to add few lines of code inside the setup().
This will ensure the Curie module will wait for the serial port to open before executing the sketch:
while (!Serial) ;
Pressing the Reset button on the MKRZero causes the microcontroller to reset as well as resetting the USB communication.
This interruption means that if the serial monitor is open, it's necessary to close and reopen it to restart the communication.
Drivers
On Windows, drivers are needed to allow the board communication. These drivers will be installed automatically when adding the core. On MacOS and Linux no driver is needed.
For more details on the Arduino MKRZero, see the product page.
The text of the Arduino getting started guide is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the guide are released into the public domain.