This library is a port of the Microsoft Azure IoT device SDK for C to Arduino. It allows you to use several Arduino compatible boards with Azure IoT Hub.
Currently supported hardware:
- Atmel SAMD Based boards
- Arduino/Genuino MKR1000
- Adafruit Feather M0
- Arduino/Genuino Zero and WiFi Shield 101
- ESP8266 based boards with esp8266/arduino
- SparkFun Thing
- Adafruit Feather Huzzah
You should have the following ready before beginning with any board:
- Setup your IoT hub
- Provision your device and get its credentials
- Arduino IDE 1.6.8
- Install the
AzureIoTHub
library
-
Currently this must be installed from source control by cloning the repo into your arduino libraries folder. An example is below:
``` cd C:\Program Files (x86)\Arduino\libraries git clone <the URI for this repository> ``` alternatively you can download the [zip file](https://github.com/stefangordon/AzureIoT/archive/master.zip) and place the contents at `C:\Program Files (x86)\Arduino\libraries\AzureIoT`
- Then reference the section appropriate for your hardware below.
-
Install esp8266 board support into your Arduino IDE.
- Start Arduino and open Preferences window.
- Enter
http://arduino.esp8266.com/stable/package_esp8266com_index.json
into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. - Open Boards Manager from Tools > Board menu and install esp8266 platform 2.1.0 or later
- Select your ESP8266 board from Tools > Board menu after installation
-
Open the AzureIoTHub ESP8266 sample from the Arduino IDE File->Examples menu.
-
Update Wifi SSID/Password in simplesample_http.ino
- Ensure you are using a wifi network that does not require additional manual steps after connection, such as opening a web browser.
-
Update IoT Hub Connection string in simplesample_http.c
- Install Feather M0 board support into your Arduino IDE.
- Start Arduino and open Preferences window.
- Enter
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. - Open Boards Manager from Tools > Board menu and install Adafruit SAMD Boards 1.0.7 or later.
- Select your Adafruit Feather M0 from Tools > Board menu after installation
- Install the Adafruit WINC1500 wifi library
- Install the
RTCZero
library from the Arduino IDE Library Manager. - Open the AzureIoTHub SAMD sample from the Arduino IDE File->Examples menu.
- Update Wifi SSID/Password in simplesample_http.ino
- Ensure you are using a wifi network that does not require additional manual steps after connection, such as opening a web browser.
- Update IoT Hub Connection string in simplesample_http.c
- Open the AzureIoTHub SAMD sample from the Arduino IDE File->Examples menu.
- Update Wifi SSID/Password in simplesample_http.ino
- Ensure you are using a wifi network that does not require additional manual steps after connection, such as opening a web browser.
- Update IoT Hub Connection string in simplesample_http.c
See LICENSE file.