{"id":41057,"date":"2021-02-26T18:46:23","date_gmt":"2021-02-26T10:46:23","guid":{"rendered":"\/blog\/?p=41057"},"modified":"2021-03-18T17:12:42","modified_gmt":"2021-03-18T09:12:42","slug":"tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/","title":{"rendered":"Learn TinyML using Wio Terminal and Arduino IDE #3 People Counting and Azure IoT Central Integration"},"content":{"rendered":"\n<p>In this article we will create a people counting system by using <a href=\"https:\/\/www.seeedstudio.com\/Wio-Terminal-p-4509.html\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener\">Wio Terminal<\/a>, an ordinary <a href=\"https:\/\/wiki.seeedstudio.com\/Grove-Ultrasonic_Ranger\/\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener\">Ultrasonic ranger<\/a> and special Deep Learning sauce to top it off and actually make it work. <\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img fetchpriority=\"high\" decoding=\"async\" width=\"700\" height=\"525\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/grove-ultrasonic-distance-sensor-preview_1.png\" alt=\"\" data-id=\"41058\" data-full-url=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/grove-ultrasonic-distance-sensor-preview_1.png\" data-link=\"\/blog\/?attachment_id=41058\" class=\"wp-image-41058\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/grove-ultrasonic-distance-sensor-preview_1.png 700w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/grove-ultrasonic-distance-sensor-preview_1-300x225.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"1030\" height=\"773\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/Raspberry-Pi-Daten-auf-dem-Wio-Terminal-LCD-Screen-anzeigen-1030x773.png\" alt=\"\" data-id=\"41060\" data-full-url=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/Raspberry-Pi-Daten-auf-dem-Wio-Terminal-LCD-Screen-anzeigen.png\" data-link=\"\/blog\/?attachment_id=41060\" class=\"wp-image-41060\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Raspberry-Pi-Daten-auf-dem-Wio-Terminal-LCD-Screen-anzeigen-1030x773.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Raspberry-Pi-Daten-auf-dem-Wio-Terminal-LCD-Screen-anzeigen-300x225.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Raspberry-Pi-Daten-auf-dem-Wio-Terminal-LCD-Screen-anzeigen-768x576.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Raspberry-Pi-Daten-auf-dem-Wio-Terminal-LCD-Screen-anzeigen-1024x768.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Raspberry-Pi-Daten-auf-dem-Wio-Terminal-LCD-Screen-anzeigen.png 1400w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>We will also utilize Microsoft Azure IoT Central service to store the room occupancy data in the cloud and visualize it on PC.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1030\" height=\"310\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/iotedge-1030x310.png\" alt=\"\" class=\"wp-image-41061\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/iotedge-1030x310.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/iotedge-300x90.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/iotedge-768x231.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/iotedge-1536x462.png 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/iotedge-1024x308.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/iotedge.png 1722w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure>\n\n\n\n<p>For more details and video tutorial, watch the corresponding video!<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Wio Terminal TinyML Course  #3 People Counting and Azure IoT Central Integration\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/pt1maDNXznI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Get to know the data<\/h2>\n\n\n\n<p>First, let\u2019s understand the data we can get from Ultrasonic sensor and how we can utilize it for determining the direction of objects. We can upload this simple script to Wio Terminal connected to Grove Ultrasonic Ranger and then walk in and walk out of the room. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include \"Ultrasonic.h\"\n#define INTERVAL_MS 50\nUltrasonic ultrasonic(0);\n\nvoid setup() {\n    Serial.begin(115200);\n    }\n\nvoid loop() {\n    static unsigned long last_interval_ms = 0;\n    float distance;\n\n    if (millis() &gt; last_interval_ms + INTERVAL_MS) {\n        last_interval_ms = millis();\n        distance = ultrasonic.MeasureInCentimeters();\n        if (distance &lt; 200.0) {\n        Serial.println(distance);\n        }\n        else\n        Serial.println(-1);\n        \/\/Serial.print('\\t');\n    }\n}<\/code><\/pre>\n\n\n\n<p>We can immediately see that for walking it, we get relatively high values(corresponding to distance from the object) first, which then decrease. And for walking out, we get completely opposite signal. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1030\" height=\"579\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/full-Time-0_02_0129-1030x579.png\" alt=\"\" class=\"wp-image-41062\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/full-Time-0_02_0129-1030x579.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/full-Time-0_02_0129-300x169.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/full-Time-0_02_0129-768x432.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/full-Time-0_02_0129-1536x864.png 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/full-Time-0_02_0129-1024x576.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/full-Time-0_02_0129.png 1920w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure>\n\n\n\n<p>Theoretically we could write an algorithm ourselves by hand, that can determine the direction. Unfortunately, real life situations are complicated &#8211; we have people that walk fast (shorter curve length) and slow (longer curve length), we have thinner people and people who are not so thin and so on. So our hand-written algorithm needs to take all of these into account, which will inevitably make it complicated and convoluted. We have a task involving inference signal processing and lots of noisy data with significant variations\u2026 And the solution is &#8212; Deep Learning. Either that, or Sherlock Holmes. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"360\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/ezgif-7-4c6d2602dd6d.gif\" alt=\"\" class=\"wp-image-41077\"\/><\/figure><\/div>\n\n\n\n<p>I\u2019ll go with Deep Learning.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Gather the data<\/h2>\n\n\n\n<p>Let\u2019s create a new project in <a href=\"https:\/\/www.edgeimpulse.com\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener\">Edge Impulse<\/a> Dashboard and prepare to get the data. For gathering the data, since we don\u2019t need very high sampling frequency, we can use data forwarder tool from edge-impulse-cli. Upload the <strong>ei_people_counter_data_collection.ino<\/strong> script (exactly the same script as pasted above) to Wio Terminal &#8211; to learn more about how to set up edge-impulse-cli and data forwarder protocol, watch the first video of TinyML series. <\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Arduino Machine Learning Tutorial: Introduction to TinyML with Wio Terminal\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/iCmlKyAp8eQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>In this particular script we filter out all the values above 200 cm, setting them to -1. <\/p>\n\n\n\n<pre id=\"block-d9836896-9b82-4d4d-9786-10bae42fb778\" class=\"wp-block-code\"><code>        if (distance &lt; 200.0) {<br>        Serial.println(distance);<br>        }<br>        else<br>        Serial.println(-1);<\/code><\/pre>\n\n\n\n<p>For your application you might need to set this value lower or higher, depending on the set up. Then start walking. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/walkinout.gif\" alt=\"\" class=\"wp-image-41079\"\/><\/figure><\/div>\n\n\n\n<p>I recorded 1 minute 30 seconds of data for every class, each time recording 5000 ms samples and then cropping them to get 1500 ms samples &#8211; remember that variety is very important in the dataset, so make sure you have samples where you (or other people) walk fast, slow, run, etc. For none category apart from samples that have nobody in front of the device, it is a good idea to include samples that have a person just <strong>standing close<\/strong> to the device and <strong>walking beside<\/strong> it, to avoid any movement being falsely classified as in or out.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Find the right processing block and network architecture<\/h2>\n\n\n\n<p>When you are done with data collection, create your impulse &#8211; I set window length to 1500 ms and windows size increase to 500 ms. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1030\" height=\"507\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/Capture-1030x507.png\" alt=\"\" class=\"wp-image-41063\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture-1030x507.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture-300x148.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture-768x378.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture-1536x756.png 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture-1024x504.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture.png 1898w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure>\n\n\n\n<p>1500 ms is more than enough to cover time duration person needs when walking in the door or walking out, except if moving extremely slow. For processing blocks, we only have two blocks this time to experiment with &#8211; <strong>Raw data<\/strong> or <strong>Spectral analysis<\/strong>. Flatten block will erase all the time-domain information from the data, making it completely useless in determining direction, so we won\u2019t use it. Spectral analysis block applies Fast Fourier transform to data samples, converting signal from time domain to frequency domain. While FFT can work for other types of signals, such as sounds or accelerometer data, in our case the frequency of signal actually also doesn\u2019t matter that much, since we cannot judge if person is coming in or going out of the room based on frequency. If you look at the data visualization after Spectral analysis block, it is clear that it\u2019s hard to separate in and out data samples. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"897\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/Capture1-1.png\" alt=\"\" class=\"wp-image-41064\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture1-1.png 671w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture1-1-224x300.png 224w\" sizes=\"(max-width: 671px) 100vw, 671px\" \/><\/figure>\n\n\n\n<p>Changing processing block to spectrogram doesn\u2019t really alleviate the problem and resulting accuracy still stays fairly low &#8211; the highest I could get was 79.6 %, with a lot of confusion between in and out classes. And the winner, once again is Raw data (with scaling) + 1D Convolutional network. I tweaked network architecture a bit to obtain 92% accuracy, for that I had to switch to \u201cexpert\u201d mode and changed MaxPool1D strides to 1 and pool size to 4. &nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1030\" height=\"677\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/Capture2-1-1030x677.png\" alt=\"\" class=\"wp-image-41065\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture2-1-1030x677.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture2-1-300x197.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture2-1-768x505.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture2-1-1024x673.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Capture2-1.png 1410w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure>\n\n\n\n<p>How good is 92% accuracy and what can be done to improve it? <\/p>\n\n\n\n<p>92% is <strong>fairly good<\/strong> as proof of concept or prototype, but <em>horrible<\/em> as a production model. For production, mileage may vary &#8211; if your application is critical and somehow used in automated control and decision making, you don\u2019t really want to have anything below 98 &#8211; 99 percent and even that might be low, think about something like a face recognition system for payment or authentication. Are there ways to improve the accuracy of this system?<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Ultrasonic sensor is cheap and ubiquitous sensor, but it is relatively slow and not very precise. We can get better data by using <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/www.seeedstudio.com\/Seeedstudio-Grove-TF-Mini-LiDAR.html\" target=\"_blank\" rel=\"noreferrer noopener\">Grove TF Mini LiDAR Module<\/a>.<\/li><li>Get more data and possibly place the sensor lower, at normal human waist level. I\u2019m 181 cm tall and placed the sensor on the level of my chest only to discover that it misses my shorter and slimmer colleagues.<\/li><li>Two are better than one &#8211; having two sensors taking measurements at slightly different places will not add too much data (we only have 31 data point in each sample), but might increase the accuracy. To explore more interesting ideas, a built-in light sensor can be used if Wio Terminal is appropriately located.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Continuous inference<\/h2>\n\n\n\n<p>Once the model is trained we can perform live classification with data from device &#8211; here I found that window size increase of 500 ms actually doesn\u2019t work that well and produces more false positives, so at the next step, when deploying to the device, I increased the value to 750 ms. To deploy the model to Wio Terminal go to deployment tab, choose Arduino library, download it, extract the archive and put it inside of your Arduino libraries folder.<\/p>\n\n\n\n<p>This time we will be using continuous inference example to make sure we are not missing any important data. Clone<a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/github.com\/AIWintermuteAI\/Seeed_Arduino_Sketchbook\" target=\"_blank\" rel=\"noreferrer noopener\"> Seeed studio example sketches repository<\/a> and open <strong>people_counting_continious.ino<\/strong> sketch with Arduino IDE, change the name of the Edge Impulse library to one matching your project name, choose Wio Terminal as your board, install <a href=\"https:\/\/github.com\/Seeed-Studio\/Seeed_Arduino_UltrasonicRanger\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener\">Grove Ultrasonic sensor library<\/a> and upload the sketch. <\/p>\n\n\n\n<p>If you remember in the first video of the series, for the inference, we would gather all the data points in the sample, perform the inference and then go back to sampling &#8211; that means that when feeding the data to neural network we would pause the data collection and loose some of the data.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"198\" height=\"324\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/10df57c-RunImpulse.png\" alt=\"\" class=\"wp-image-41067\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/10df57c-RunImpulse.png 198w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/10df57c-RunImpulse-183x300.png 183w\" sizes=\"(max-width: 198px) 100vw, 198px\" \/><\/figure><\/div>\n\n\n\n<p> That is not optimal and we can use either DMA (Direct Memory Access), threading or multiprocessing to fix this issue. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"462\" height=\"351\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/DMA.gif\" alt=\"\" class=\"wp-image-41068\"\/><\/figure><\/div>\n\n\n\n<p>Wio Terminal MCU (Cortex M4F core) only has one core, so multiprocessing is not an option &#8211; so in this case we will use FreeRTOS and threads. What is going to happen is that during the inference process, FreeRTOS will pause inference for a brief moment, collect the data sample and then go back to inference. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"601\" height=\"329\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/TaskExecution.jpg\" alt=\"\" class=\"wp-image-41069\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/TaskExecution.jpg 601w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/TaskExecution-300x164.jpg 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/figure><\/div>\n\n\n\n<p>This way the actual inference will take a little longer, but the difference is negligible for this particular use case. We perform inference every 500 ms, so every 500 ms slice of the time window will be performed inference on for 3 times. Then we take the result that has the highest confidence across 3 inferences &#8211; for example we have highest confidence for \u201cout\u201d label 2 times and for \u201cnone\u201d label one time, thus the result should be classified as \u201cout\u201d. To simplify the testing I added the lines that turn on Wio Terminal screen when person is entering the room and turns it off when a person exits.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/test1.gif\" alt=\"\" class=\"wp-image-41080\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Azure IoT Central Integration<\/h2>\n\n\n\n<p>Okay, the model works, but again all in by itself it is not suitable for actually applying it in the real world. Let\u2019s add two elements to make it into a full-fledged application &#8211; a <strong>simple GUI<\/strong> and <strong>data upload to cloud<\/strong> with pretty graphs. We will use <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/wiki.seeedstudio.com\/Wio-Terminal-LVGL\/\" target=\"_blank\" rel=\"noreferrer noopener\">LVGL library<\/a> for creating graphical user interface and <a href=\"https:\/\/apps.azureiotcentral.com\/\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener\">Microsoft Azure IoT Central<\/a> service for sending data to and visualization. The resulting sketch is 693 lines long and has 3 concurrent threads running in RTOS. I spent about 2 days working on ML part of this project and 2 more making GUI, Azure and Edge Impulse work together. All good fun. Here is a quick recap of steps you need to make it work with IoT central.<\/p>\n\n\n\n<p>The code for Azure IoT central connection is modified version of sketch from <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/github.com\/SeeedJP\/wioterminal-aziot-example\" target=\"_blank\" rel=\"noreferrer noopener\">Seeed Japan Github<\/a>, which in turn is based on <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/github.com\/kartben\/wioterminal-azureiothub-sample\" target=\"_blank\" rel=\"noreferrer noopener\">Benjamin Kabe\u2019s original work<\/a> porting official Azure SDK for C to Wio Terminal. Both Benjamin and Seeed Japanese office used Platform.io with Visual Studio Code &#8211; while it is a great framework, which adds a lot of convenience, my tutorials are based on Arduino IDE and I didn\u2019t want to change IDE just for one project. Porting code from VS Code to Arduino IDE is actually quite straightforward: &nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>I renamed main.cpp to sketch.ino and put the header files from include folder to sketch folder, together with source files. <\/li><li>azure-sdk-for-c folder needs to be placed inside of Arduino libraries folder and you will need to install a bunch of libraries manually. <\/li><li>Finally change these lines in Signature.cpp<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;mbedtls\/base64.h&gt; \n#include &lt;mbedtls\/md.h&gt;\n#include &lt;mbedtls\/sha256.h&gt;<\/code><\/pre>\n\n\n\n<p>To just<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include \"Seeed_mbedtls.h\"<\/code><\/pre>\n\n\n\n<p>Install the necessary libraries:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;github.com\/Seeed-Studio\/Seeed_Arduino_rpcWiFi#v1.0.2\n=https:\/\/github.com\/Seeed-Studio\/Seeed_Arduino_rpcUnified#v2.1.1\nhttps:\/\/github.com\/Seeed-Studio\/Seeed_Arduino_mbedtls#dev\nhttps:\/\/github.com\/Seeed-Studio\/Seeed_Arduino_FS\nhttps:\/\/github.com\/Seeed-Studio\/Seeed_Arduino_SFUD\nhttps:\/\/github.com\/sstaub\/NTP\nPubSubClient\nhttps:\/\/github.com\/lovyan03\/LovyanGFX#0.3.4\nhttps:\/\/github.com\/ciniml\/ExtFlashLoader\nhttps:\/\/github.com\/Seeed-Studio\/Seeed_Arduino_LIS3DHTR\nhttps:\/\/github.com\/bxparks\/AceButton\nMsgPack<\/code><\/pre>\n\n\n\n<p>And it will compile as a normal Arduino IDE project. You can find it in <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/github.com\/AIWintermuteAI\/Seeed_Arduino_Sketchbook\" target=\"_blank\" rel=\"noreferrer noopener\">this GIthub repository<\/a>, under name WioTerminal_Azure_Central.ino, with all changes already made. After the sketch is uploaded, enter configuration mode by pressing three buttons on top of Wio Terminal and resetting the device. &#8220;In configuration mode&#8221; will be displayed on device screen. Connect to device with Serial monitor (baud rate 115200, carriage return) and set WiFi SSID, password and Azure IoT Central credentials (in the following format <strong>set_az_iotc<\/strong> <code>your_ID_scope<\/code> <code>your_primary_key<\/code> <code>your_device_ID<\/code>)  , which you can get by following these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Go to https:\/\/apps.azureiotcentral.com\/<\/li><li>If you don&#8217;t have a Microsoft account yet, register one.<\/li><li>Go to Build -&gt; Custom app. Enter the app name and unique URL (can be similar to app name). Choose Free plan.<\/li><li>After an app is created, go to Device Templates. Make a new template of IoT device type. Choose custom model, add three capabilities as in the below screenshot and two interfaces (press on Views -&gt; Visualizing the device). After finishing that and making sure everything is correct, publish the template. <\/li><li>Create a new device from template by going to Devices and pressing on New, remember to choose the Template you just created and published!<\/li><li>Get the ID scope from Administration -&gt; Device connection, Primary key from Administration -&gt; Device connection -&gt; SAS-IoT-Devices and device ID from Devices tab, where you created your device on Step 5.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1030\" height=\"528\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/image-6-1030x528.png\" alt=\"\" class=\"wp-image-41081\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-6-1030x528.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-6-300x154.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-6-768x394.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-6-1024x525.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-6.png 1359w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure>\n\n\n\n<p>After configuration is successful, restart Wio Terminal and it will start connecting to Azure IoT Central, you can watch the detailed progress feedback on the Serial Terminal. You will then be able to see a) Device status on dashboard has changed to Provisioned b) Telemetry data from Accelerometer sensor in Device -&gt; Raw data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1030\" height=\"372\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/image-8-1030x372.png\" alt=\"\" class=\"wp-image-41083\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-8-1030x372.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-8-300x108.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-8-768x277.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-8-1024x369.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/image-8.png 1081w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure>\n\n\n\n<p>We then add the parts responsible for Edge Impulse model inference, threading and modify send telemetry function to send values for number of people entered, people left and total number of people in the room. We also add simple GUI consisting of three buttons and a text field, which displays information updates &#8211; you can see the resulting sketch by opening <strong>WioTerminal_EI_People_Counting_Azure_Central_LVGL<\/strong>.ino. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/test2.gif\" alt=\"\" class=\"wp-image-41096\"\/><\/figure><\/div>\n\n\n\n<p>The hardest part was really making sure everything works normally in each separate thread and does not influence other threads. Sacrifices were made in order to accommodate that without over-complicating the code too much, for example placing LVGL task update function right after interface updates and not letting it run periodically saved a lot of headache.<\/p>\n\n\n\n<p>The application we made today with Wio Terminal while not ready for production, but with some additional work can be used to measure and control the occupancy of rooms. Try it out yourself and see the results! Hope you enjoyed the article and the video, stay tuned for next article in TinyML series.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we will create a people counting system by using Wio Terminal, an<\/p>\n","protected":false},"author":3505,"featured_media":41073,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[3585,1608,3588,10,1113,3003,3678],"class_list":["post-41057","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-azure-iot-central","tag-machine-learning","tag-microsoft-azure","tag-sensor","tag-ultrasonic-sensor","tag-wio-terminal","tag-wio-terminal-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learn TinyML using Wio Terminal and Arduino IDE #3 People Counting and Azure IoT Central Integration - Latest News from Seeed Studio<\/title>\n<meta name=\"description\" content=\"In this article we will create a people counting system by using Wio Terminal, an ordinary Ultrasonic ranger and special Deep Learning sauce to top it off and actually make it work.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn TinyML using Wio Terminal and Arduino IDE #3 People Counting and Azure IoT Central Integration - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"In this article we will create a people counting system by using Wio Terminal, an ordinary Ultrasonic ranger and special Deep Learning sauce to top it off and actually make it work.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-26T10:46:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-18T09:12:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png\" \/>\n\t<meta property=\"og:image:width\" content=\"862\" \/>\n\t<meta property=\"og:image:height\" content=\"838\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Dmitry Maslov\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dmitry Maslov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/\",\"name\":\"Learn TinyML using Wio Terminal and Arduino IDE #3 People Counting and Azure IoT Central Integration - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png\",\"datePublished\":\"2021-02-26T10:46:23+00:00\",\"dateModified\":\"2021-03-18T09:12:42+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/be44021cef50367de429a4d5f613ed2f\"},\"description\":\"In this article we will create a people counting system by using Wio Terminal, an ordinary Ultrasonic ranger and special Deep Learning sauce to top it off and actually make it work.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png\",\"width\":862,\"height\":838},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn TinyML using Wio Terminal and Arduino IDE #3 People Counting and Azure IoT Central Integration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/\",\"name\":\"Latest News from Seeed Studio\",\"description\":\"Emerging IoT, AI and Autonomous Applications on the Edge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/be44021cef50367de429a4d5f613ed2f\",\"name\":\"Dmitry Maslov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b60714970fdc7dfa4a5d9915477bdd24?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b60714970fdc7dfa4a5d9915477bdd24?s=96&r=g\",\"caption\":\"Dmitry Maslov\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/dmitry-maslov\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn TinyML using Wio Terminal and Arduino IDE #3 People Counting and Azure IoT Central Integration - Latest News from Seeed Studio","description":"In this article we will create a people counting system by using Wio Terminal, an ordinary Ultrasonic ranger and special Deep Learning sauce to top it off and actually make it work.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/","og_locale":"en_US","og_type":"article","og_title":"Learn TinyML using Wio Terminal and Arduino IDE #3 People Counting and Azure IoT Central Integration - Latest News from Seeed Studio","og_description":"In this article we will create a people counting system by using Wio Terminal, an ordinary Ultrasonic ranger and special Deep Learning sauce to top it off and actually make it work.","og_url":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2021-02-26T10:46:23+00:00","article_modified_time":"2021-03-18T09:12:42+00:00","og_image":[{"width":862,"height":838,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png","type":"image\/png"}],"author":"Dmitry Maslov","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Dmitry Maslov","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/","url":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/","name":"Learn TinyML using Wio Terminal and Arduino IDE #3 People Counting and Azure IoT Central Integration - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png","datePublished":"2021-02-26T10:46:23+00:00","dateModified":"2021-03-18T09:12:42+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/be44021cef50367de429a4d5f613ed2f"},"description":"In this article we will create a people counting system by using Wio Terminal, an ordinary Ultrasonic ranger and special Deep Learning sauce to top it off and actually make it work.","breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png","width":862,"height":838},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/26\/tinyml-with-wio-terminal-3-people-counting-and-azure-iot-central-integration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Learn TinyML using Wio Terminal and Arduino IDE #3 People Counting and Azure IoT Central Integration"}]},{"@type":"WebSite","@id":"https:\/\/www.seeedstudio.com\/blog\/#website","url":"https:\/\/www.seeedstudio.com\/blog\/","name":"Latest News from Seeed Studio","description":"Emerging IoT, AI and Autonomous Applications on the Edge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/be44021cef50367de429a4d5f613ed2f","name":"Dmitry Maslov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b60714970fdc7dfa4a5d9915477bdd24?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b60714970fdc7dfa4a5d9915477bdd24?s=96&r=g","caption":"Dmitry Maslov"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/dmitry-maslov\/"}]}},"modified_by":"Dmitry Maslov","views":4953,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png",862,838,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429-80x80.png",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429-300x292.png",300,292,true],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429-768x747.png",640,623,true],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-1030x798.png",640,496,true],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png",862,838,false],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png",862,838,false],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png",32,32,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429.png",862,838,false],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-936x838.png",936,838,true],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-1024x793.png",1024,793,true],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429-720x380.png",720,380,true],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/wio-031-e1614336337429-675x450.png",675,450,true]},"author_info":{"display_name":"Dmitry Maslov","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/dmitry-maslov\/"},"category_info":"<a href=\"https:\/\/www.seeedstudio.com\/blog\/category\/news\/\" rel=\"category tag\">News<\/a>","tag_info":"News","comment_count":"1","_links":{"self":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/41057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/users\/3505"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=41057"}],"version-history":[{"count":10,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/41057\/revisions"}],"predecessor-version":[{"id":41464,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/41057\/revisions\/41464"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/41073"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=41057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=41057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=41057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}