%3CLINGO-SUB%20id%3D%22lingo-sub-1121262%22%20slang%3D%22en-US%22%3EEasily%20Connect%20Espressif%20Devices%20to%20Azure%20IoT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1121262%22%20slang%3D%22en-US%22%3E%3CP%3EMicrocontrollers%20have%20come%20a%20long%20way%20since%20Texas%20Instruments%20created%20the%20first%20microcontroller%20for%20their%20calculator%20and%20discovered%20widespread%20possibilities%20for%20their%20chip%20creation.%20Today%2C%20with%20read%2Fwrite%20flash%20memory%20and%20their%20ability%20to%20be%20programmed%20with%20higher%20end%20languages%20like%20C%2C%20microcontrollers%20are%20the%20most%20widely%20used%20chip%20in%20the%20industry%3CSPAN%3E.%20%3C%2FSPAN%3ERecently%20our%20team%20has%20been%20working%20with%20Espressif%20low-power%20system-on-chip%20microcontroller%20devices.%20If%20you%20haven%E2%80%99t%20heard%20of%20Espressif%20or%20if%20the%20name%20seems%20somewhat%20familiar%2C%20it%E2%80%99s%20because%20Espressif%20is%20the%20semiconductor%20company%20that%20created%20the%20wildly%20popular%20ESP32%20and%20ESP8266%20chips%2C%20modules%20and%20boards.%20Lately%20my%20mission%20has%20been%20to%20make%20%3CSPAN%3Eit%20%3C%2FSPAN%3Eeasier%20to%20connect%20the%20ESP%20brand%20of%20microcontrollers%20to%20Azure%20IoT%20leveraging%20the%20Azure%20IoT%20C%20SDK%20port.%3C%2FP%3E%0A%3CP%3EToday%2C%20we%20are%20excited%20to%20share%20to%20resources%20to%20make%20building%20and%20connecting%20your%20production%20level%20ESP32%20and%20ESP8266%20RTOS%20applications%20to%20Azure%20IoT%20%E2%80%9Clike%20a%20breeze%E2%80%9D.%20These%20resources%20include%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%20style%3D%22list-style-type%3A%20square%3B%22%3E%0A%3CLI%3EReady%20to%20use%20%3CSTRONG%3EEspressif%20IoT%20Development%20Framework%3C%2FSTRONG%3E%20(%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fespressif%2Fesp-idf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EESP-IDF%3C%2FA%3E)%20%3CSTRONG%3Ecomponents%3C%2FSTRONG%3E%20for%20Azure%20IoT%20with%20%26amp%3B%20without%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fiot-pnp%2Foverview-iot-plug-and-play%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPlug%20and%20Play%20functionality%3C%2FA%3E%20that%20you%20can%20drag%20and%20drop%20into%20your%20ESP32%20or%20ESP8266%20project%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EDev%20Environment%20setup%20scripts%3C%2FSTRONG%3E%20for%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwsl%2Fabout%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWindows%20Subsystem%20for%20Linux%20(WSL)%3C%2FA%3E%20to%20get%20the%20ESP%20toolchain%20and%20development%20framework%20quickly%20setup%20on%20your%20machine.%20This%20includes%20an%20optional%20shell%20script%20that%20will%20conveniently%20allow%20you%20to%20switch%20between%20versions%20of%20the%20ESP-IDF%20and%20ESP8266%20development%20framework%20%3CSTRONG%3E%3CEM%3E%20ESP-IDF%20stable%20version%203.3%20or%20latest%20version%204.x%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EAzure%20IoT%20Samples%3C%2FSTRONG%3E%20for%20ESP32%20and%20ESP8266%20using%20various%20sensors%20and%20connecting%20to%20Azure%20IoT%20Hub%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EDetailed%3C%2FSTRONG%3E%20%3CSTRONG%3Eguidance%3C%2FSTRONG%3E%20on%20setting%20up%20and%20connecting%20your%20Espressif%20boards%20to%20Azure%20IoT%20so%20you%20can%20successfully%20build%20your%20targeted%20solution%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EYou%20can%20checkout%20these%20ESP%20IDF%20style%20resources%20on%20GitHub%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fespazure-1staidkit%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20ESP-Samples%20repo%3C%2FA%3E.%20Never%20fear%2C%20if%20you%20are%20into%20tinkering%20with%20ESP%20and%20Azure%20using%20Arduino%2C%20you%20can%20check%20out%20our%20step-by-step%20tutorial%20for%20ESP32%20using%20Azure%20IoT%20Device%20Workbench%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsamples%2Fazure-samples%2Fesp32-iot-devkit-get-started%2Fsample%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1083431320%22%20id%3D%22toc-hId-1083431320%22%20id%3D%22toc-hId-1083431320%22%20id%3D%22toc-hId-1083431320%22%20id%3D%22toc-hId-1083431320%22%20id%3D%22toc-hId-1083431320%22%3E%3CSTRONG%3ELet%E2%80%99s%20get%20ready%20to%20ESP%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EAs%20an%20engineer%2C%20there%20is%20simply%20no%20way%20to%20share%20the%20great%20news%20about%20this%20Azure%20Espressif%20resource%20without%20also%20walking%20through%20building%20code%20and%20kicking%20off%20your%20ESP%20journey%20with%20Azure%20IoT%20the%20right%20way.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1773992794%22%20id%3D%22toc-hId-1773992794%22%20id%3D%22toc-hId-1773992794%22%20id%3D%22toc-hId-1773992794%22%20id%3D%22toc-hId-1773992794%22%20id%3D%22toc-hId-1773992794%22%3E%3CU%3EIntroducing%20the%20ESP32-Azure%20IoT%20Kit%3C%2FU%3E%3C%2FH4%3E%0A%3CP%3EThe%20first%20thing%20is%20to%20do%20when%20starting%20our%20ESP%20journey%20is%20to%20decide%20which%20Espressif%20board%20to%20utilize.%20Luckily%20last%20year%3CSPAN%3E%2C%3C%2FSPAN%3E%20Espressif%20released%20an%20Azure%20IoT%20Certified%20Plug%20and%20Play%20board%2C%20the%20ESP32-Azure%20IoT%20Kit.%20This%20is%20an%20impressive%20development%20board%20powered%20by%20a%20ESP32-WROVER-B%20MCU%20module%2C%20with%20built%20in%20Wi-Fi%2C%20BLE%2C%20OLED%2C%20button%2C%20and%20sensors%20for%20humidity%2C%20temperature%2C%20light%2C%20barometer%2C%20and%20more.%20You%20can%20learn%20more%20about%20this%20board%E2%80%99s%20hardware%20and%20view%20the%20schematic%20by%20taking%20a%20look%20its%20%3CA%20href%3D%22https%3A%2F%2Fwww.espressif.com%2Fsites%2Fdefault%2Ffiles%2Fdocumentation%2Fesp32-azure_iot_kit_hardware_design_guide__en.pdf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EHardware%20Design%20Guide%3C%2FA%3E.%20As%20you%20can%20see%20from%20the%20picture%20below%20I%E2%80%99ve%20already%20connected%20my%20ESP32%20Azure%20IoT%20device%20to%20my%20computer%20and%20it%E2%80%99s%20ready%20to%20go.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166413iC26728611A93F45E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ESince%20I%E2%80%99m%20on%20a%20Windows%2010%20machine%2C%20let%E2%80%99s%20go%20to%20Device%20Manager%20and%20find%20out%20what%20serial%20port%20the%20ESP32%20device%20is%20connected%20on.%20In%20Device%20Manager%2C%20under%20Ports%20there%20will%20be%20an%20USB%20to%20UART%20virtual%20COM%20port%20driver%20shown%2C%20which%20the%20associated%20COM%20port%20the%20board%20is%20connected%20on.%26nbsp%3B%20It%E2%80%99s%20key%20to%20take%20note%20of%20the%20connected%20port%2C%20as%20it%20will%20be%20essential%20later.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166404iFA29CD98EE70987D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22text-align%3A%20left%3B%22%3EWith%20my%20serial%20port%20information%20in%20hand%2C%20it%E2%80%99s%20time%20to%20set%20up%20the%20ESP%20development%20environment%20on%20my%20machine.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--33461669%22%20id%3D%22toc-hId--33461669%22%20id%3D%22toc-hId--33461669%22%20id%3D%22toc-hId--33461669%22%20id%3D%22toc-hId--33461669%22%20id%3D%22toc-hId--33461669%22%3E%3CU%3ESetting%20up%20WSL%20for%20ESP%20Development%3C%2FU%3E%3C%2FH4%3E%0A%3CP%3EI%E2%80%99ve%20already%20cloned%20the%20repo%20and%20I%20have%20the%20Ubuntu%20distro%20of%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwsl%2Finstall-win10%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWindows%20Subsystem%20for%20Linux%3C%2FA%3E%20on%20my%20machine.%20Given%20this%2C%20I%20just%20need%20to%20run%20the%20development%20setup%20script%20provided%20in%20the%20repo%20by%20going%20to%20the%20%3CSTRONG%3Einstall-script%3C%2FSTRONG%3E%26nbsp%3Bfolder%20and%20running%3CCODE%3E%3CSTRONG%3Esource%20.%2Fesp-setup.sh%3C%2FSTRONG%3E%3C%2FCODE%3E%20This%20script%20will%20update%20your%20WSL%20packages%2C%20install%20the%20ESP%20toolchain%20and%20development%20framework%2C%20as%20well%20as%20set%20the%20environment%20variables%20that%20are%20needed.%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166414i255BDCA72D19C0FC%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EOnce%20you%20see%20the%20magic%20words%20%3CSTRONG%3EDev%20Environment%20Setup%20Completed%3C%2FSTRONG%3E%2C%20you%20are%20ready%20to%20build%20and%20run%20the%20samples.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--1840916132%22%20id%3D%22toc-hId--1840916132%22%20id%3D%22toc-hId--1840916132%22%20id%3D%22toc-hId--1840916132%22%20id%3D%22toc-hId--1840916132%22%20id%3D%22toc-hId--1840916132%22%3E%3CU%3EReady%2C%20Set%2C%20Build%3C%2FU%3E%3C%2FH4%3E%0A%3CP%3ELet's%20take%20one%20of%20the%20samples%20in%20the%20SDK%20and%20run%20it.%26nbsp%3B%20First%20thing%20I%20should%20do%20is%20copy%20one%20of%20the%20versions%20of%20the%20Azure%20IoT%20ESP%20component%20I%20want%20into%20the%20desired%20sample%E2%80%99s%20component%20directory.%26nbsp%3B%20I%20have%202%20options%3B%20Azure%20IoT%20ESP%20component%20with%20PnP%20%3CSTRONG%3E(%3C%2FSTRONG%3E%3CSTRONG%3Eesp-azure-pnp%3C%2FSTRONG%3E%3CSTRONG%3E)%3C%2FSTRONG%3E%20and%20Azure%20IoT%20ESP%20component%20without%20PnP%20%3CSTRONG%3E(%3C%2FSTRONG%3E%3CSTRONG%3Eesp-azure%3C%2FSTRONG%3E%3CSTRONG%3E)%3C%2FSTRONG%3E.%20These%20components%20can%20be%20found%20within%20the%20repo%20under%20the%20%3CSTRONG%3Ecomponents%3C%2FSTRONG%3E%20folder.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166418i5587F1F0B8A60A14%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EI%E2%80%99ll%20go%20with%20the%20%3CSTRONG%3Eesp-azure%3C%2FSTRONG%3E%20component%20so%20we%20can%20build%20the%20%3CSTRONG%3Eazure-esp-starter%3C%2FSTRONG%3E%20sample.%20I%E2%80%99ll%20navigate%20to%20the%20samples%20folder%20within%20the%20repo%20directory%20and%20going%20to%20that%20sample%E2%80%99s%20folder.%20Next%20I%E2%80%99ll%20copy%20the%20%3CSTRONG%3Eesp-azure%3C%2FSTRONG%3E%20component%20into%20the%20sample%E2%80%99s%20components%20directory.%20These%20are%20the%20same%20steps%20you%20would%20follow%20if%20you%20were%20building%20your%20own%20ESP%20application%20using%20the%20Azure%20IoT%20ESP%20component.%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166419i33446F0EFF63E64F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20the%20component%20copied%2C%20I%20will%20naviagate%20back%20to%20azure-esp-starter%20folder%20to%20configure%20and%20build%20this%20sample.%26nbsp%3B%20To%20configure%20the%20sample%20I%20will%20run%20%3CCODE%3Emake%20menuconfig%3C%2FCODE%3E.%20If%20I%20choose%20to%20use%20Cmake%20instead%20of%20Make%2C%20I%20would%20run%20%3CCODE%3Eidf.py%20menuconfig%3C%2FCODE%3E.%3C%2FP%3E%0A%3CP%3EUpon%20running%20this%20command%2C%20I%20will%20see%20the%20%3CSTRONG%3EEspressif%20IoT%20Development%20Framework%20configuration%3C%2FSTRONG%3E%20window%20come%20up.%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166420i49E909E36126AA46%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_2.png%22%20title%3D%22clipboard_image_2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ERemember%20I%20noted%20that%20ESP32%20board%20COM%20port%20was%20important%2C%20well%20within%20configuration%20is%20where%20we%20will%20use%20the%20the%20COM%20port%20information.%20I%20will%20select%20the%20%3CSTRONG%3ESerial%20Flash%20config%20%3C%2FSTRONG%3Eoption%20on%20the%20menu%2C%20then%20select%20the%20first%20menu%20option%20%3CSTRONG%3EDefault%20serial%20port.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166421i81A391B6FB5FC685%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_3.png%22%20title%3D%22clipboard_image_3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOnce%20I%E2%80%99m%20in%20the%20%3CSTRONG%3EDefault%20serial%20port%3C%2FSTRONG%3E%20window%2C%20I%20will%20delete%20the%20%3CCODE%3EUSB0%3C%2FCODE%3E%20at%20the%20end%20of%20this%20path%20and%20replace%20it%20with%20a%20capital%20S%20and%20the%20number%20of%20my%20COM%20port.%20Which%20in%20my%20case%20my%20device%20was%20on%20COM%205%2C%20so%20my%20serial%20port%20should%20be%20%3CCODE%3E%2Fdev%2FttyS5%3C%2FCODE%3E.%26nbsp%3B%20Upon%20completion%20I%E2%80%99ll%20choose%20%3CSTRONG%3EOk%3C%2FSTRONG%3E%2C%20and%20then%20select%20%3CSTRONG%3EExit%3C%2FSTRONG%3E%20two%20(2)%20more%20times%20to%20return%20to%20the%20first%20configuration%20screen.%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166422iFC0C67B95099AD1B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_4.png%22%20title%3D%22clipboard_image_4.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENow%20I%20need%20to%20add%20my%20Azure%20IoT%20Hub%20Device%20information%20to%20the%20configuration%2C%20so%20I%20will%20select%20the%20%3CSTRONG%3EESP32%20App%20Config%3C%2FSTRONG%3E%20menu%20option.%20This%20is%20where%20I%20am%20going%20to%20add%20the%20Wi-Fi%20information%20and%20the%20Azure%20IoT%20Hub%20Device%20Connection%20string%20to%20the%20ESP32%20configuration.%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166440i73E14DB2865F9365%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20I%20%3CSTRONG%3EExit%3C%2FSTRONG%3E%20(and%20%3CSTRONG%3EExit%3C%2FSTRONG%3E%20again)%20the%20configuration%20is%20saved%2C%20and%20now%20comes%20the%20fun%20part%3B%20Building%20and%20Flashing%20to%20the%20ESP32%20Azure%20board!%26nbsp%3B%20To%20compile%20the%20code%2C%20build%2Flink%20the%20binary%20and%20flash%20to%20the%20board%20usually%20I%20would%20run%20the%20command%3A%20%3CCODE%3Emake%20flash%3C%2FCODE%3E.%20But%20since%20I%E2%80%99m%20sharing%20the%20fun%20with%20you%20all%20reading%20this%20blog%20post%2C%20I%20will%20run%20the%20command%3A%20%3CCODE%3Emake%20flash%20monitor%3C%2FCODE%3E%20which%20will%20in%20addition%20to%20building%20and%20flashing%2C%20will%20show%20the%20log%20and%20information%20from%20the%20board%20coming%20across%20the%20serial%20port%20connection.%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166445iAFCD5620B86B34A8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166448i1D1110581DF8070B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20successfully%20building%20and%20flashing%20code%20to%20the%20board%2C%20you%20will%20see%20on%20the%20console%20information%20about%20the%20data%20coming%20from%20the%20sensors%20and%20the%20confirmation%20of%20that%20data%20being%20written%20to%20Azure%20IoT.%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166449i7FB4C28EB38A7838%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166450i757C2A0D81BD460C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_2.png%22%20title%3D%22clipboard_image_2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EMy%20sensor%20data%20for%20Temperature%2C%20Humidity%20and%20Light%20is%20also%20being%20written%20to%20the%20OLED%20on%20the%20board.%26nbsp%3B%20In%20the%20code%20there%20are%20functions%20that%20you%20can%20alter%20to%20write%20the%20data%20that%20you%20desire%20to%20the%20OLED%20instead.%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166451i71372C104D845CF4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ELast%20thing%20I%20will%20do%20is%20go%20to%20the%20Azure%20portal%20and%20show%20that%20the%20ESP32%20sensor%20data%20is%20indeed%20coming%20into%20my%20Azure%20IoT%20Hub%20and%20and%20with%20the%20route%20I%20configured%3B%20it%20is%20being%20sent%20into%20data%20storage.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-646596701%22%20id%3D%22toc-hId-646596701%22%20id%3D%22toc-hId-646596701%22%20id%3D%22toc-hId-646596701%22%20id%3D%22toc-hId-646596701%22%20id%3D%22toc-hId-646596701%22%3E%3CSTRONG%3E%3CU%3EDevices%20%26amp%3B%20Data%20In%20the%20Cloud%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FH4%3E%0A%3CP%3EAs%20shown%20below%2C%20this%20is%20my%20IoT%20Hub%20and%20a%20graphical%20representation%20of%20the%20messages%20being%20received%20from%20my%20ESP32%20Azure%20IoT%20device%2C%20as%20well%20as%2C%20it%E2%80%99s%20device%20twin%20information.%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166452i52969C29655DEA57%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166454i5CA971B2CAB439C6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFinally%20here%20is%20a%20snapshot%20of%20the%20ESP32%20sensor%20data%20being%20routed%20and%20stored%20in%20storage%20account%20within%20Azure.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166455i9E14B0EED420A9BE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166457i4FC1108C1F126CDE%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F166456i14843CFDB5D361D1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_2.png%22%20title%3D%22clipboard_image_2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-636093597%22%20id%3D%22toc-hId-636093597%22%20id%3D%22toc-hId-636093597%22%20id%3D%22toc-hId-636093597%22%20id%3D%22toc-hId-636093597%22%20id%3D%22toc-hId-636093597%22%3E%3CSTRONG%3E%3CU%3ESummary%3C%2FU%3E%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EEspressif%20boards%20are%20great%20devices%20to%20build%20the%20IoT%20solution%20of%20your%20dreams%20with%20the%20Azure%20cloud.%20We%20hope%20that%20this%20Azure%20IoT%20ESP%20resource%20kit%20helps%20you%20to%20quickly%20and%20easily%20start%20your%20development%20journey%20with%20Azure%20IoT%20and%20ESP%20devices.%26nbsp%3B%20Remember%20you%20can%20check%20out%20all%20the%20samples%20and%20helper%20scripts%20inside%20this%20kit%20on%20the%20GitHub%20repo%20at%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fespazure-1staidkit%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Fespazure-1staidkit%3C%2FA%3E.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFinally%2C%20don%E2%80%99t%20let%20your%20Azure%20IoT%20journey%20stop%20here.%20To%20dig%20deeper%20into%20all%20the%20Azure%20IoT%20services%2C%20you%20can%20review%20loads%20of%20great%20IoT%20technical%20content%20like%20the%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2Foverview%2Fiot%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20IoT%20documentation%3C%2FA%3E%2C%20the%20%3CA%20href%3D%22https%3A%2F%2Fchannel9.msdn.com%2FShows%2FInternet-of-Things-Show%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EIoT%20Show%20on%20Channel%209%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Flearn%2Fbrowse%2F%3Fproducts%3Dazure%26amp%3Bterm%3DIoT%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMS%20Learn%20resources%20for%20Azure%20IoT%3C%2FA%3E%2C%20and%20the%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Finternet-of-things-iot%2Fct-p%2FIoT%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EMicrosoft%20Tech%20Community%20IoT%20group%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHappy%20Coding!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1121262%22%20slang%3D%22en-US%22%3E%3CP%3EToday%2C%20we%20are%20excited%20to%20share%20what%20we%20are%20calling%20the%20Espressif%20First%20Aid%20kit%20with%20contains%20resources%20to%20make%20building%20and%20connecting%20your%20production%20level%20ESP32%20and%20ESP8266%20RTOS%20applications%20to%20Azure%20IoT%20%E2%80%9Clike%20a%20breeze%E2%80%9D.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1121262%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EESP%20Devices%20on%20Azure%20IoT%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1127837%22%20slang%3D%22en-US%22%3ERe%3A%20Easily%20Connect%20Espressif%20Devices%20to%20Azure%20IoT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1127837%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EWe%20have%20been%20working%20with%20the%20Wrover%20ESP32%20module%20for%20quite%20some%20time%20now.%20The%20esp-idf%20SDK%20is%20very%20good%20and%20contains%20many%20examples%20to%20get%20started.%20They%20have%20a%20ready%20to%20use%20docker%20image%20for%20the%20building%20system%2C%20which%20is%20great.%20The%20Espressif%20team%20is%20very%20active%20in%20answering%20questions%20on%20git%20hub.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20esp%20azure%20port%20has%20been%20added%20with%20certain%20features%20and%20may%20be%20sufficient%20for%20certain%20projects%20but%20has%20significant%20limitations%20for%20enterprise-level%20projects%3A%3C%2FP%3E%3CP%3E-%20Only%20support%20MQTT%20protocol%20(no%20MQTT%20over%20websocket%2C%20no%20AMQP%2C%20..)%3B%3C%2FP%3E%3CP%3E-%20Upload%20file%20when%20using%20x509%20certificate%20doesn't%20works%2C%20only%20works%20with%20symmetric%20key%20authentication%3B%3C%2FP%3E%3CP%3E-%20Http%20proxy%20is%20not%20supported.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20this%20article%2C%20we%20will%20take%20a%20look%20at%20the%20new%26nbsp%3BIoT%20Plug%20and%20Play%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1128012%22%20slang%3D%22en-US%22%3ERe%3A%20Easily%20Connect%20Espressif%20Devices%20to%20Azure%20IoT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1128012%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F531647%22%20target%3D%22_blank%22%3E%40fredtibo%3C%2FA%3E%26nbsp%3BHi.%20There%20is%20support%20for%20the%20following%20protocols%20with%20the%20port%20since%20it%20is%20based%20upon%20the%20Azure%20IoT%20C%20SDK%3A%26nbsp%3B%3CBR%20%2F%3E-%20MQTT%3CBR%20%2F%3E-%20MQTT%20OVER%20WEBSOCKETS%3CBR%20%2F%3E-AMQP%3CBR%20%2F%3E-AMQP%20OVER%20WEBSOCKETS%3CBR%20%2F%3E-HTTP%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20can%20see%20an%20example%20of%20the%20libraries%20needed%20for%20usage%20in%20the%20sample%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fespressif%2Fesp-azure%2Fblob%2Fmaster%2Fexamples%2Fiothub_devicetwin_samples_and_methods%2Fmain%2Fiothub_client_device_twin_and_methods_sample.c%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fespressif%2Fesp-azure%2Fblob%2Fmaster%2Fexamples%2Fiothub_devicetwin_samples_and_methods%2F%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1128113%22%20slang%3D%22en-US%22%3ERe%3A%20Easily%20Connect%20Espressif%20Devices%20to%20Azure%20IoT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1128113%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F273698%22%20target%3D%22_blank%22%3E%40taraew%3C%2FA%3E%26nbsp%3BHi%2C%20I%20know%20by%20Microsoft%20documentation%20and%20code%20samples%20that%20it%20is%20supposed%20to%20be%20supported%2C%20but%20all%20the%20protocol%20implementation%20are%20delivered%20by%20the%20module%20vendors%20and%20only%20MQTT%20is%20supported%20from%20Espressif.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere's%20at%20least%20two%20tickets%20opened%20on%20this%20subject%20on%20the%20github%20of%20esp-azure%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fespressif%2Fesp-azure%2Fissues%2F31%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fespressif%2Fesp-azure%2Fissues%2F31%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fespressif%2Fesp-azure%2Fissues%2F62%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fespressif%2Fesp-azure%2Fissues%2F62%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply%20and%20article!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1289484%22%20slang%3D%22en-US%22%3ERe%3A%20Easily%20Connect%20Espressif%20Devices%20to%20Azure%20IoT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1289484%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F531647%22%20target%3D%22_blank%22%3E%40fredtibo%3C%2FA%3E%26nbsp%3BI'll%20check%20out%20these%20issues%20and%20post%20any%20resolutions%20that%20I%20find.%20Which%20protocol%20are%20you%20needing%20that%20you%20having%20issues%20with%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

Microcontrollers have come a long way since Texas Instruments created the first microcontroller for their calculator and discovered widespread possibilities for their chip creation. Today, with read/write flash memory and their ability to be programmed with higher end languages like C, microcontrollers are the most widely used chip in the industry. Recently our team has been working with Espressif low-power system-on-chip microcontroller devices. If you haven’t heard of Espressif or if the name seems somewhat familiar, it’s because Espressif is the semiconductor company that created the wildly popular ESP32 and ESP8266 chips, modules and boards. Lately my mission has been to make it easier to connect the ESP brand of microcontrollers to Azure IoT leveraging the Azure IoT C SDK port.

Today, we are excited to share to resources to make building and connecting your production level ESP32 and ESP8266 RTOS applications to Azure IoT “like a breeze”. These resources include:

 

  • Ready to use Espressif IoT Development Framework (ESP-IDF) components for Azure IoT with & without Plug and Play functionality that you can drag and drop into your ESP32 or ESP8266 project
  • Dev Environment setup scripts for Windows Subsystem for Linux (WSL) to get the ESP toolchain and development framework quickly setup on your machine. This includes an optional shell script that will conveniently allow you to switch between versions of the ESP-IDF and ESP8266 development framework ESP-IDF stable version 3.3 or latest version 4.x
  • Azure IoT Samples for ESP32 and ESP8266 using various sensors and connecting to Azure IoT Hub
  • Detailed guidance on setting up and connecting your Espressif boards to Azure IoT so you can successfully build your targeted solution

You can checkout these ESP IDF style resources on GitHub in the Azure ESP-Samples repo. Never fear, if you are into tinkering with ESP and Azure using Arduino, you can check out our step-by-step tutorial for ESP32 using Azure IoT Device Workbench here.

 

Let’s get ready to ESP

As an engineer, there is simply no way to share the great news about this Azure Espressif resource without also walking through building code and kicking off your ESP journey with Azure IoT the right way.

Introducing the ESP32-Azure IoT Kit

The first thing is to do when starting our ESP journey is to decide which Espressif board to utilize. Luckily last year, Espressif released an Azure IoT Certified Plug and Play board, the ESP32-Azure IoT Kit. This is an impressive development board powered by a ESP32-WROVER-B MCU module, with built in Wi-Fi, BLE, OLED, button, and sensors for humidity, temperature, light, barometer, and more. You can learn more about this board’s hardware and view the schematic by taking a look its Hardware Design Guide. As you can see from the picture below I’ve already connected my ESP32 Azure IoT device to my computer and it’s ready to go.

 

clipboard_image_0.png

Since I’m on a Windows 10 machine, let’s go to Device Manager and find out what serial port the ESP32 device is connected on. In Device Manager, under Ports there will be an USB to UART virtual COM port driver shown, which the associated COM port the board is connected on.  It’s key to take note of the connected port, as it will be essential later.

  

clipboard_image_1.png

With my serial port information in hand, it’s time to set up the ESP development environment on my machine.

 

Setting up WSL for ESP Development

I’ve already cloned the repo and I have the Ubuntu distro of the Windows Subsystem for Linux on my machine. Given this, I just need to run the development setup script provided in the repo by going to the install-script folder and running source ./esp-setup.sh This script will update your WSL packages, install the ESP toolchain and development framework, as well as set the environment variables that are needed.

clipboard_image_1.png


Once you see the magic words Dev Environment Setup Completed, you are ready to build and run the samples.

 

Ready, Set, Build

Let's take one of the samples in the SDK and run it.  First thing I should do is copy one of the versions of the Azure IoT ESP component I want into the desired sample’s component directory.  I have 2 options; Azure IoT ESP component with PnP (esp-azure-pnp) and Azure IoT ESP component without PnP (esp-azure). These components can be found within the repo under the components folder.

 

clipboard_image_0.png

I’ll go with the esp-azure component so we can build the azure-esp-starter sample. I’ll navigate to the samples folder within the repo directory and going to that sample’s folder. Next I’ll copy the esp-azure component into the sample’s components directory. These are the same steps you would follow if you were building your own ESP application using the Azure IoT ESP component.

clipboard_image_1.png

 

With the component copied, I will naviagate back to azure-esp-starter folder to configure and build this sample.  To configure the sample I will run make menuconfig. If I choose to use Cmake instead of Make, I would run idf.py menuconfig.

Upon running this command, I will see the Espressif IoT Development Framework configuration window come up.

clipboard_image_2.png

Remember I noted that ESP32 board COM port was important, well within configuration is where we will use the the COM port information. I will select the Serial Flash config option on the menu, then select the first menu option Default serial port.

clipboard_image_3.png

Once I’m in the Default serial port window, I will delete the USB0 at the end of this path and replace it with a capital S and the number of my COM port. Which in my case my device was on COM 5, so my serial port should be /dev/ttyS5.  Upon completion I’ll choose Ok, and then select Exit two (2) more times to return to the first configuration screen.

clipboard_image_4.png

Now I need to add my Azure IoT Hub Device information to the configuration, so I will select the ESP32 App Config menu option. This is where I am going to add the Wi-Fi information and the Azure IoT Hub Device Connection string to the ESP32 configuration.

clipboard_image_0.png

 

Once I Exit (and Exit again) the configuration is saved, and now comes the fun part; Building and Flashing to the ESP32 Azure board!  To compile the code, build/link the binary and flash to the board usually I would run the command: make flash. But since I’m sharing the fun with you all reading this blog post, I will run the command: make flash monitor which will in addition to building and flashing, will show the log and information from the board coming across the serial port connection.

clipboard_image_1.png

 

clipboard_image_0.png

 

After successfully building and flashing code to the board, you will see on the console information about the data coming from the sensors and the confirmation of that data being written to Azure IoT.

clipboard_image_1.png

clipboard_image_2.png

My sensor data for Temperature, Humidity and Light is also being written to the OLED on the board.  In the code there are functions that you can alter to write the data that you desire to the OLED instead.

clipboard_image_0.png

Last thing I will do is go to the Azure portal and show that the ESP32 sensor data is indeed coming into my Azure IoT Hub and and with the route I configured; it is being sent into data storage.

 

Devices & Data In the Cloud

As shown below, this is my IoT Hub and a graphical representation of the messages being received from my ESP32 Azure IoT device, as well as, it’s device twin information.

clipboard_image_1.png

clipboard_image_0.png

Finally here is a snapshot of the ESP32 sensor data being routed and stored in storage account within Azure.

 

clipboard_image_1.png

 

clipboard_image_0.png

clipboard_image_2.png

 

Summary

Espressif boards are great devices to build the IoT solution of your dreams with the Azure cloud. We hope that this Azure IoT ESP resource kit helps you to quickly and easily start your development journey with Azure IoT and ESP devices.  Remember you can check out all the samples and helper scripts inside this kit on the GitHub repo at https://aka.ms/espazure-1staidkit

Finally, don’t let your Azure IoT journey stop here. To dig deeper into all the Azure IoT services, you can review loads of great IoT technical content like the Azure IoT documentation, the IoT Show on Channel 9, MS Learn resources for Azure IoT, and the Microsoft Tech Community IoT group.

 

Happy Coding!

 

4 Comments
Visitor

Hi,

We have been working with the Wrover ESP32 module for quite some time now. The esp-idf SDK is very good and contains many examples to get started. They have a ready to use docker image for the building system, which is great. The Espressif team is very active in answering questions on git hub.

 

The esp azure port has been added with certain features and may be sufficient for certain projects but has significant limitations for enterprise-level projects:

- Only support MQTT protocol (no MQTT over websocket, no AMQP, ..);

- Upload file when using x509 certificate doesn't works, only works with symmetric key authentication;

- Http proxy is not supported.

 

Thanks for this article, we will take a look at the new IoT Plug and Play

Microsoft

@fredtibo Hi. There is support for the following protocols with the port since it is based upon the Azure IoT C SDK: 
- MQTT
- MQTT OVER WEBSOCKETS
-AMQP
-AMQP OVER WEBSOCKETS
-HTTP

You can see an example of the libraries needed for usage in the sample: https://github.com/espressif/esp-azure/blob/master/examples/iothub_devicetwin_samples_and_methods/ 

Visitor

@taraew Hi, I know by Microsoft documentation and code samples that it is supposed to be supported, but all the protocol implementation are delivered by the module vendors and only MQTT is supported from Espressif.

 

There's at least two tickets opened on this subject on the github of esp-azure:

 

https://github.com/espressif/esp-azure/issues/31

https://github.com/espressif/esp-azure/issues/62

 

Thanks for your reply and article!

Microsoft

@fredtibo I'll check out these issues and post any resolutions that I find. Which protocol are you needing that you having issues with?