Copyright
Arduino and Genuino MKR1000 Development Workshop
Agus Kurniawan
1st Edition, 2016
Copyright 2016 Agus Kurniawan
Table of Contents
Preface
This book was written to help anyone want to get started with Arduino/Genuino MKR1000 development. It describes the basic elements of the development of Arduino/Genuino MKR1000.
Agus Kurniawan
Berlin, April 2016
1. Setting up Development Environment
1.1 Arduino and Genuino MKR1000
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. This board uses Atmel microcontroller series. There are many Arduino hardware models that you can use. Further information about Arduino products, you can visit on website http://arduino.cc/en/ .
Arduino MKR1000 has been designed to offer a practical and cost effective solution for makers seeking to add Wi-Fi connectivity to their projects with minimal previous experience in networking.


You can buy this product on your local electronic store. You also can order it by online. Find it on http://arduino.cc/en/Main/Buy. You also can find this board on its distributor.
1.2 Electronic Components
We need electronic components to build our testing, for instance, Resistor, LED, sensor devices and etc. I recommend you can buy electronic component kit.
1.2.1 Arduino Starter Kit
Store website: http://arduino.cc/en/Main/ArduinoStarterKit

1.2.2 Fritzing
Store website: http://shop.fritzing.org/ .
You can buy Fritzing Starter Kit with Arduino UNO or Fritzing Starter Kit with Arduino Mega.


1.2.3 Cooking-Hacks: Arduino Starter Kit
Store website: http://www.cooking-hacks.com/index.php/shop/arduino/starter-kits/arduino-starter-kit.html

1.2.4 Arduino Sidekick Basic kit
Store website: http://www.seeedstudio.com/depot/arduino-sidekick-basic-kit-p-775.html
Alternative online store
http://www.amazon.com/Arduino-Sidekick-Basic-Kit-Version/dp/B007B14HM8/
http://www.exp-tech.de/Zubehoer/Arduino-Sidekick-Basic-Kit.html

1.3 Unboxing
Since I live outside USA, I could bought Genuino MKR1000 from http://arduino.cc. The following is the package.

After opened, I get Genuino MKR1000 board with pin headers.

1.4 Testing
For testing, I used Genuino MKR1000 on Windows, Mac and Ubuntu machines.

I also used Arduino Sidekick Basic kit for electronic components. I have some another electronics kit.

2. Sketch Programming
This chapter explains how to work with Arduino/Genuino MKR1000 development using Sketch.
2.1 Getting Started
The Arduino integrated development environment (IDE) is a cross-platform application written in Java, and derives from the IDE for the Processing programming language and the Wiring projects. A program or code written for Arduino is called a "sketch.
To develop application based on Arduino board, we need Arduino software. You can obtain it on http://arduino.cc/en/Main/Software . Please install based on your platform. To develop Arduino and Genuino MKR1000, you must install Arduino 1.6.8 or later.

2.2 Arduino Hardware Driver
On OSX and Linux platforms, you don't need install any driver. OSX has already recognized your Arduino board. You can verify it on Terminal.
ls /dev/cu*
You should serial port information of Arduino board on Terminal, for instance, I have detected Arduino board on /dev/cu.usbmodem1411.

Sometimes it has problems due to Virtual USB to seria. You can download and install it from http://www.ftdichip.com/Drivers/VCP.htm .

For Windows platform, you should install the driver. When you set up Arduino/Genuino MKR1000, the driver will be installed too. Please follow steps on section 2.3 before connecting Arduino/Genuino MKR1000 board into Windows PC.
2.3 Setting up Arduino and Genuino MKR1000 on Arduino Sketch
To set up Arduino software for Arduino/Genuino MKR1000, we should install SAMD Boards. You can click menu Tools -> Board -> Boards Manager..

After that, you should get a dialog. Find Arduino SAMD Boards, shown in Figure below.

Select it and then click Install button.
If done, you should Arduino/Genuino MKR1000 on board list from Arduino software.

Now you're ready to develop programs for Arduino/Genuino MKR1000.
2.4 Hello World for Arduino and Genuino MKR1000
Now you're ready to get started. For illustration, I use the sample code from Arduino, Blink. You can visit on http://arduino.cc/en/Tutorial/Blink for configuration. By default, Arduino/Genuino MKR1000 board has been attached a LED on digital pin 6.
On Arduino software, Click