Getting Started With The ESPRESSIF ESP32-Azure IoT Kit

8m ago
10 Views
1 Downloads
625.49 KB
10 Pages
Last View : 14d ago
Last Download : 3m ago
Upload by : Kamden Hassan
Transcription

Getting started with the ESPRESSIF ESP32-Azure IoT Kit For the latest version of this guide, please refer to: Getting Started Guide Total completion time: 30 minutes In this tutorial you use the Azure FreeRTOS Middleware to connect the ESPRESSIF ESP32-Azure IoT Kit (hereafter, the ESP32 DevKit) to Azure IoT. The article is part of the series IoT Device Development. The series introduces device developers to the Azure FreeRTOS Middleware, and shows how to connect several device evaluation kits to Azure IoT. You will complete the following tasks: Install the embedded development tools Build the image and flash it onto the ESP32 DevKit Use Azure IoT Central to create cloud components, view properties, view device telemetry, and call direct commands 1. Prerequisites An ESP-IDF supported Operating System: o o o Windows (Recommended) Linux macOS Hardware o ESPRESSIF ESP32-Azure IoT Kit o Wi-Fi 2.4 GHz o USB 2.0 A male to Micro USB male data cable 2. Prepare the development environment To set up your development environment, first you install the ESPRESSIF ESP-IDF, and then you launch the ESP-IDF Powershell and clone the repository. Install the tools This project is built using the ESP-IDF, which includes all the tools required to clone, build, flash and monitor your device. For Windows: 1. Download and launch the ESP-IDF Online installer. 2. When prompted for the version of ESP-IDF, choose the latest release version. 3. When prompted for components to be installed, choose Full installation. For Linux or macOS: 1. Install the prerequisites by following the instructions at ESP-IDF Get Started.

2. Is is recommended to checkout a release version of the ESP-IDF, the master branch may contain blocking bugs. This guide was tested against ESP-IDF v4.3.1. git checkout tags/v4.3.1 NOTE: For advanced installations, or for more information relating to the ESP-IDF, please refer to the ESP-IDF Programming Guide. 3. Create the cloud components Create the IoT Central Application There are several ways to connect devices to Azure IoT. In this section, you learn how to connect a device by using Azure IoT Central. IoT Central is an IoT application platform that reduces the cost and complexity of creating and managing IoT solutions. To create a new application: 1. From Azure IoT Central portal, select My apps on the side navigation menu. 2. Select New application. 3. Select Custom apps. 4. Add Application Name and a URL. 5. Choose the Free Pricing plan to activate a 7-day trial.

6. Select Create. 7. After IoT Central provisions the application, it redirects you automatically to the new application dashboard. Note: If you have an existing IoT Central application, you can use it to complete the steps in this article rather than create a new application. Create a new device In this section, you use the IoT Central application dashboard to create a new device. You will use the connection information for the newly created device to securely connect your physical device in a later section. To create a device: 1. From the application dashboard, select Devices on the side navigation menu. 2. Select New to bring up the Create a new device window. 3. Leave Device template as Unassigned. 4. Fill in the desired Device name and Device ID. 5. Select the Create button. 6. The newly created device will appear in the All devices list. Select on the device name to show details. 7. Select Connect in the top right menu bar to display the connection information used to configure the device in the next section.

8. Note the connection values for the following connection string parameters displayed in Connect dialog. You'll use these values during the following configuration step: ID scope Device ID Primary key 4. Prepare the device To connect the ESP32 DevKit to Azure, you'll modify a configuration file for Wi-Fi and Azure IoT settings, rebuild the image, and flash the image to the device. Launch the ESP-IDF Powershell From this point, all commands are launched from with the ESP-IDF command line. To launch the command line: 1. From the Windows Start menu, launch the ESP-IDF 4.3 PowerShell. Clone the repo for the tutorial Clone the following repo to download all sample device code. If you previously cloned this repo in another tutorial, you don't need to do it again. Using the ESP-IDF Powershell: 1. Navigate to a directory where you wish to clone the repo. 2. Clone the repo with the following command: git clone --recursive eertos-samples

Add configuration Using the ESP-IDF Powershell: 1. Navigate to the iot-middleware-freertos-samples directory that was cloned in the previous steps. 2. Navigate to the ESP-Azure IoT Kit project directory: demos\projects\ESPRESSIF\aziotkit 3. Execute the following command to launch the configurator: idf.py menuconfig Add Azure IoT Central configuration: 1. Select Azure IoT middleware for FreeRTOS Main Task Configuration --- 2. Enable Enable Device Provisioning Sample 3. Set the following parameters, using the connection information saved after you created Azure resources. Parameter 4. Value Azure IoT Device Symmetric Key {Your Primary key value} Azure Device Provisioning Service ID Scope {Your ID scope value} Azure Device Provisioning Service Registration ID {Your Device ID value} Press ESC to return to the previous menu Add Wi-Fi configuration: 1. Select Azure IoT middleware for FreeRTOS Sample Configuration --- 2. Set the following parameters using your local Wi-Fi credentials. Parameter 3. Value WiFi SSID {Your WiFi SSID} WiFi Password {Your WiFi password} Press ESC to return to the previous menu Save configuration: 1. Press S and then press Enter so save the configuration, and Enter to dismiss the acknowledgment 2. Press Q to quit the configuration tool

Build the image In your console, run the following commands from the ESSIF\aziotkit directory to build the device image: idf.py --no-ccache -B "C:\espbuild" build After the build completes, you can confirm that the binary file was created with the following path: RESSIF\aziotkit\build\azure iot freertos esp32.bin Flash the image 1. On the ESP32 DevKit, locate the Micro USB port as highlight in the image below. 2. Connect the Micro USB cable to the Micro USB port on the ESP32 DevKit, and then connect it to your computer. 3. Within the Windows Device Manager, locate the Com Port associated with the ESP32 DevKit as shown in the image below. 4. From the ESP-IDF Powershell, execute the following command, substituting the correct COM Port from the previous step (e.g. COM3): 5. idf.py --no-ccache -B "C:\espbuild" -p COM port flash The path "C:\espbuild" above is only a suggestion, feel free to use a different one, as long as it is near your root directory, for a shorter path. 6. Check the output completes with the following text for a successful flash:

7. Hash of data verified 8. Leaving. 9. Hard resetting via RTS pin. 10. Done Confirm device connection details You can use the ESP-IDF monitor tool to observe communication and confirm that your device is set up correctly. 1. From the ESP-IDF Powershell, start the monitoring tool, substituting the correct COM Port: idf.py -B "C:\espbuild" -p COM port monitor 2. Check for the following output to confirm that the device is initialized and connected to Azure IoT. 3. I (32881) AZ IOT: Keeping Connection Idle. 4. I (35021) AZ IOT: Successfully sent telemetry message 5. I (35021) AZ IOT: Attempt to receive publish message from IoT Hub. 5. Verify the device status To view the device status in IoT Central portal: 1. From the application dashboard, select Devices on the side navigation menu. 2. Check the Device status of the device is updated to Provisioned. 3. Check the Device template of the device has updated to Espressif ESP32 Azure IoT Kit. View telemetry With IoT Central, you can view the flow of telemetry from your device to the cloud. To view telemetry in IoT Central portal: 1. From the application dashboard, select Devices on the side navigation menu. 2. Select the device from the device list. 3. View the telemetry as the device sends messages to the cloud in the Overview tab.

Send a command on the device You can also use IoT Central to send a command to your device. In this section, you can call a command to toggle LEDs or write to the screen. To write to the screen: 1. Select the Command tab from the device page. 2. Locate the Display Text command. 3. In the Content textbox, enter the text to be displayed on the screen. 4. Select Run. 5. The screen on the device will update with the desired text. To toggle an LED: 1. Select the Command tab from the device page. 2. Locate the Toggle LED 1 or Toggle LED 2 command 3. Select Run. 4. An LED light on the device will toggle state.

View device information You can view the device information from IoT Central. Select About tab from the device page.

Clean up resources If you no longer need the Azure resources created in this tutorial, you can delete them from the IoT Central portal. Optionally, if you continue to another tutorial in this Getting Started guide, you can keep the resources you've already created and reuse them. To keep the Azure IoT Central sample application but remove only specific devices: 1. Select the Devices tab for your application. 2. Select the device from the device list. 3. Select Delete. To remove the entire Azure IoT Central sample application and all its devices and resources: 1. Select Administration Your application. 2. Select Delete. Next Steps In this tutorial you built a custom image that contains the Azure FreeRTOS middleware sample code, and then flashed the image to the ESP32 DevKit device. You also used the IoT Central portal to create Azure resources, connect the ESP32 DevKit securely to Azure, view telemetry, and send messages.

ESP-IDF 4.3 PowerShell. Clone the repo for the tutorial . Clone the following repo to download all sample device code. If you previously cloned this repo in another tutorial, you don't need to do it again. Using the ESP-IDF Powershell: 1. Navigate to a directory where you wish to clone the repo. 2. Clone the repo with the following command:

Related Documents:

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have

Chính Văn.- Còn đức Thế tôn thì tuệ giác cực kỳ trong sạch 8: hiện hành bất nhị 9, đạt đến vô tướng 10, đứng vào chỗ đứng của các đức Thế tôn 11, thể hiện tính bình đẳng của các Ngài, đến chỗ không còn chướng ngại 12, giáo pháp không thể khuynh đảo, tâm thức không bị cản trở, cái được

More than words-extreme You send me flying -amy winehouse Weather with you -crowded house Moving on and getting over- john mayer Something got me started . Uptown funk-bruno mars Here comes thé sun-the beatles The long And winding road .

Le genou de Lucy. Odile Jacob. 1999. Coppens Y. Pré-textes. L’homme préhistorique en morceaux. Eds Odile Jacob. 2011. Costentin J., Delaveau P. Café, thé, chocolat, les bons effets sur le cerveau et pour le corps. Editions Odile Jacob. 2010. Crawford M., Marsh D. The driving force : food in human evolution and the future.