You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 22, 2022. It is now read-only.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
2
-
3
-
#### Azure IoT Hub Library source files
4
-
5
-
6
1
# AzureIoTHub - Azure IoT Hub library for Arduino
7
2
8
-
This is the location of the Arduino-specific source files for the
9
-
10
-
[AzureIoTHub Arduino published library](https://github.com/Azure/azure-iot-arduino).
11
-
12
-
This library is a port of the [Microsoft Azure IoT device SDK for C](https://github.com/Azure/azure-iot-sdk-c) to Arduino. It allows you to use several Arduino compatible boards with Azure IoT Hub. Please submit any contribution directly to [azure-iot-sdks](https://github.com/Azure/azure-iot-sdks).
13
-
14
-
Currently supported hardware:
15
-
16
-
- ESP8266 based boards with [esp8266/arduino](https://github.com/esp8266/arduino)
You should have the following ready before beginning with any board:
29
-
30
-
-[Setup your IoT hub](https://github.com/Azure/azure-iot-device-ecosystem/blob/master/setup_iothub.md)
31
-
32
-
-[Provision your device and get its credentials](https://github.com/Azure/azure-iot-device-ecosystem/blob/master/setup_iothub.md#create-new-device-in-the-iot-hub-device-identity-registry)
- Install the Azure IoT C SDK libraries by one of two options:
37
-
1. Generate the Libraries by executing the [`make_sdk.py`](https://github.com/Azure/azure-iot-pal-arduino/blob/master/build_all/make_sdk.py) script within the `build_all` folder, E.x.: `python3 make_sdk.py -o <your-output-folder>`
38
-
- Note: this is also currently the ONLY way to build the `AzureIoTSocket_WiFi` library for using the esp32.
39
-
40
-
2. Install the following libraries through the Arduino IDE Library Manager:
##### Sparkfun Thing, Adafruit Feather Huzzah, or generic ESP8266 board
48
-
49
-
1. Install esp8266 board support into your Arduino IDE.
50
-
51
-
- Start Arduino and open Preferences window.
52
-
53
-
- 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.
54
-
55
-
- Open Boards Manager from Tools > Board menu and install esp8266 platform 2.5.2 or later
56
-
57
-
- Select your ESP8266 board from Tools > Board menu after installation
58
-
59
-
2. Open the `iothub_ll_telemetry_sample` example from the Arduino IDE File->Examples->AzureIoTHub menu.
3
+
The Azure Iot library for Arduino is under review and will be re-released soon.
60
4
61
-
3. Update Wifi SSID/Password in `iot_configs.h`
5
+
In the meantime, for Arduino scenarios we recommend using the Embedded C SDK in one of the following Samples:
62
6
63
-
- Ensure you are using a wifi network that does not require additional manual steps after connection, such as opening a web browser.
4. Update IoT Hub Connection string in `iot_configs.h`
66
-
67
-
5. Configure board library using the automation script and `python3`. If you choose this method you can skip step 6.
68
-
- Clone or download this repo: `git clone https://github.com/Azure/azure-iot-pal-arduino.git` , navigate to the downloaded sub-folder: `cd azure-iot-pal-arduino/build_all/base-libraries/AzureIoTHub/src/scripts` , and check that the script `automate_board_config.py` exists in this location. If this folder or script cannot be located, download the script [directly](https://raw.githubusercontent.com/Azure/azure-iot-pal-arduino/master/build_all/base-libraries/AzureIoTHub/src/scripts/automate_board_config.py).
69
-
- Run the script E.x.: `python3 automate_board_config.py` and select appropriate options.
70
-
- Note: if you update or reinstall your board library in Arduino you will need to run this script again.
71
-
72
-
6. Navigate to where your esp8266 board package is located, typically in `C:\Users\<your username>\AppData\Local\Arduino15\packages` on Windows and `~/.arduino15/packages/` on Linux
73
-
74
-
- Locate the board's `Arduino.h` (`hardware/esp8266/<board package version>/cores/esp8266/` and comment out the line containing `#define round(x)`, around line 137.
75
-
76
-
- Two folders up from the `Arduino.h` step above, in the same folder as the board's `platform.txt`, paste the [`platform.local.txt`](https://github.com/Azure/azure-iot-arduino/blob/master/examples/iothub_ll_telemetry_sample/esp8266/platform.local.txt) file from the `esp8266` folder in the sample into it.
77
-
78
-
- Note1: It is necessary to add `-DDONT_USE_UPLOADTOBLOB` and `-DUSE_BALTIMORE_CERT` to `build.extra_flags=` in a `platform.txt` in order to run the sample, however, you can define them in your own `platform.txt` or a `platform.local.txt` of your own creation.
79
-
80
-
- Note2: If your device is not intended to connect to the global portal.azure.com, please change the CERT define to the appropriate cert define as laid out in [`certs.c`](https://github.com/Azure/azure-iot-sdk-c/blob/master/certs/certs.c)
81
-
82
-
- Note3: Due to RAM limits, you must select just one CERT define.
83
-
84
-
7. Run the sample.
85
-
86
-
8. Access the [SparkFun Get Started](https://azure.microsoft.com/en-us/documentation/samples/iot-hub-c-thingdev-getstartedkit/) tutorial to learn more about Microsoft Sparkfun Dev Kit.
87
-
88
-
9. Access the [Huzzah Get Started](https://azure.microsoft.com/en-us/documentation/samples/iot-hub-c-huzzah-getstartedkit/) tutorial to learn more about Microsoft Huzzah Dev Kit.
1. Install esp32 board support into your Arduino IDE.
95
-
96
-
- Start Arduino and open Preferences window.
97
-
98
-
- Enter `https://dl.espressif.com/dl/package_esp32_index.json` into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
99
-
100
-
- Open Boards Manager from Tools > Board menu and install esp32 platform 1.0.2 or later
101
-
102
-
- Select your ESP32 board from Tools > Board menu after installation
103
-
104
-
2. Open the `iothub_ll_telemetry_sample` example from the Arduino IDE File->Examples->AzureIoTHub menu.
105
-
106
-
3. Update Wifi SSID/Password in `iot_configs.h`
107
-
108
-
- Ensure you are using a wifi network that does not require additional manual steps after connection, such as opening a web browser.
109
-
110
-
4. Update IoT Hub Connection string in `iot_configs.h`
111
-
112
-
5. Configure board library using the automation script and `python3`. If you choose this method you can skip step 6.
113
-
- Clone or download this repo: `git clone https://github.com/Azure/azure-iot-pal-arduino.git` , navigate to the downloaded sub-folder: `cd azure-iot-pal-arduino/build_all/base-libraries/AzureIoTHub/src/scripts` , and check that the script `automate_board_config.py` exists in this location. If this folder or script cannot be located, download the script [directly](https://raw.githubusercontent.com/Azure/azure-iot-pal-arduino/master/build_all/base-libraries/AzureIoTHub/src/scripts/automate_board_config.py).
114
-
- Run the script E.x.: `python3 automate_board_config.py` and select appropriate options.
115
-
- Note: if you update or reinstall your board library in Arduino you will need to run this script again.
116
-
117
-
6. Navigate to where your esp32 board package is located, typically in `C:\Users\<your username>\AppData\Local\Arduino15\packages` on Windows and `~/.arduino15/packages/` on Linux
118
-
119
-
- Navigate deeper in to `hardware/esp8266/<board package version>/` where the `platform.txt` file lives.
120
-
121
-
- Copy the [`platform.local.txt`](https://github.com/Azure/azure-iot-arduino/blob/master/examples/iothub_ll_telemetry_sample/esp32/platform.local.txt) file from the `esp32` folder in the sample into the same folder as the `platform.txt`.
122
-
123
-
- Alternatively, or for later versions of the Board Package, add the define `-DDONT_USE_UPLOADTOBLOB` to `build.extra_flags=` in `platform.txt` or a `platform.local.txt` that you create.
124
-
125
-
7. Run the sample.
126
-
127
-
8. Access the [SparkFun Get Started](https://azure.microsoft.com/en-us/documentation/samples/iot-hub-c-thingdev-getstartedkit/) tutorial to learn more about Microsoft Sparkfun Dev Kit.
128
-
129
-
9. Access the [Huzzah Get Started](https://azure.microsoft.com/en-us/documentation/samples/iot-hub-c-huzzah-getstartedkit/) tutorial to learn more about Microsoft Huzzah Dev Kit.
130
11
131
12
## License
132
13
@@ -140,3 +21,6 @@ See [LICENSE](LICENSE) file.
140
21
Complete information for contributing to the Azure IoT Arduino libraries
141
22
142
23
can be found [here](https://github.com/Azure/azure-iot-pal-arduino).
24
+
25
+
26
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
0 commit comments