-
Notifications
You must be signed in to change notification settings - Fork 0
2.1 Arduino MKR1000 device
Go to the Arduino website to get the best and authoritative description of the Arduino/Genuino MKR1000 device. At the time of writing this article, the official documentation is kind of non-existent, because the board has not yet been released to the public.
The MKR1000 device seems to be combination of some other existing documented Arduino hardware, like the Arduino Zero board + a WiFi101 shield. To get to know the MKR1000 device better at the time of writing, a good idea is to look at these two boards.
Go to the Getting Started with Arduino page on the Arduino website to read about Arduino programming and download the Arduino development software.
Before you can use the MKR1000 board from the Arduino IDE, you must first install it using the "Boards Manager" menu item.
Although the Boards Manager shows a newer version than the 1.6.3 I have used, I have not been successfull in using the version 1.6.4. If I choose that, I don't see the MKR1000 board in my boards list. Using version 1.6.3 has been working fine.
To use the MKR1000 board to connect to a WiFi network, Arduino has provided a wifi library to use. This library is named "WiFi101". It is also used for the WiFi101 shield. Go to the Arduino WiFi101 Library page to read all about it.
To use the DHT22 temperature and humidity sensor, you need to install and use the supporting library. Adafruit has made this library named "DHT Sensor Library".
In order to connect your device to the Azure IoTHub in a secure way, you will need to use the HTTPS protocol. This requires a SSL certificate, which must be installed in the device. You will use the WiFi101 library, which contains a class to use for secure SSL connections. Read about the WiFiSSLClient here.
You get the SSL certificate from your Azure IoTHub, when you have that configured and running. To get the SSL certificate and configure your device to use the SSL certificate, you need to use a tool, which is provided by Arduino on GitHub here Firmware/Certificates updater for the WiFi 101 and MKR1000. You should read the explanation on how to use it there.
The tool to use is called "WiFi101 FirmwareUpdater", and in use it looks like this:
I have erased the part of my Azure IotHub name. You must of course provide the name of your own IoTHub, when you have it configured and running.