<?xml version="1.0" encoding="UTF-8" ?><!-- generator=Zoho Sites --><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><atom:link href="https://www.campuscomponent.com/blogs/lora-and-zigbee/feed" rel="self" type="application/rss+xml"/><title>Campus - Blog , Lora and Zigbee</title><description>Campus - Blog , Lora and Zigbee</description><link>https://www.campuscomponent.com/blogs/lora-and-zigbee</link><lastBuildDate>Sat, 09 May 2026 09:07:26 -0700</lastBuildDate><generator>http://zoho.com/sites/</generator><item><title><![CDATA[LoRa Enabled GPS Tracker with ESP8266 & Nuvoton N032LE3AE]]></title><link>https://www.campuscomponent.com/blogs/post/lora-enabled-gps-tracker-with-esp8266-nuvoton-n032le3ae</link><description><![CDATA[<img align="left" hspace="5" src="https://www.campuscomponent.com/Lora enabled Gps tracking with esp8366 and nuvoton N032LE3AE.jpg"/>Discover the Seamless GPS tracking solution powered by LoRa technology, ESP8266, and Nuvoton N032LE3AE. Achieve superior performance and efficiency for diverse applications.]]></description><content:encoded><![CDATA[
<div class="zpcontent-container blogpost-container "><div data-element-id="elm_WW3ygwk6SJCee1Tw4O5W_A" data-element-type="section" class="zpsection "><style type="text/css"></style><div class="zpcontainer"><div data-element-id="elm_yG17cgm_T8yLjbKP4Hmk9w" data-element-type="row" class="zprow zpalign-items- zpjustify-content- "><style type="text/css"></style><div data-element-id="elm_SMehCcUWQY2M8z2nmw_YmQ" data-element-type="column" class="zpelem-col zpcol-12 zpcol-md-12 zpcol-sm-12 zpalign-self- "><style type="text/css"></style><div data-element-id="elm_qid6bhopTEyi-gy_LWLKMA" data-element-type="heading" class="zpelement zpelem-heading "><style> [data-element-id="elm_qid6bhopTEyi-gy_LWLKMA"].zpelem-heading { border-radius:1px; } </style><h2
 class="zpheading zpheading-align-center " data-editor="true"></h2></div>
<div data-element-id="elm_yXAxNlzOT2KWLrTpkbtLRg" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_yXAxNlzOT2KWLrTpkbtLRg"].zpelem-text{ border-radius:1px; } </style><div class="zptext zptext-align-center " data-editor="true"><div><p style="text-align:justify;"><img src="/Lora%20enabled%20Gps%20tracking%20with%20esp8366%20and%20nuvoton%20N032LE3AE.jpg" style="width:1099.3101px !important;height:702px !important;max-width:100% !important;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">In industrial applications like logistics and inventory management tracking applications are used on a large level. GPS Tracking is also used in cab services, vehicle monitoring, human tracking, asset management, and public transport surveillance. However, traditional vehicle tracking systems that rely on GSM technology often encounter challenges in areas with poor signal coverage, limiting their effectiveness. The introduction of ESP8266 with a LoRa-based GPS tracker is the solution to this problem, where you can track your asset from any remote location in the world. In this project article we will build a LoRa Based Low Power GPS Tracker with ESP8266 and also look at how you can integrate the same with Nuvoton N032LE3AE module.</span></p><h2 style="text-align:justify;margin-bottom:6pt;"><span style="font-size:16pt;font-weight:400;color:rgb(0, 0, 0);">Components Required</span></h2><ul><li style="font-size:11pt;font-weight:700;"><p style="text-align:justify;"><a href="https://www.campuscomponent.com/products/nln500-lora-module-wi-2588-d/2208614000017682013"><span style="font-size:11pt;font-weight:400;color:rgb(0, 0, 0);">NLN500 LoRa Module&nbsp;</span></a></p></li><li style="font-size:11pt;font-weight:700;"><p style="text-align:justify;"><span style="font-size:11pt;font-weight:400;color:rgb(0, 0, 0);">Neo 6M GPS Module</span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><a href="https://www.campuscomponent.com/products/esp8266-nodemcu-wifi-development-board/2208614000001865343"><span style="font-size:11pt;color:rgb(0, 0, 0);">ESP8266 Development Board</span></a></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">LM2596 Step-down Converter.</span></p></li><li style="font-size:11pt;"><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">LoRa Gateway</span></p></li></ul><h2 style="text-align:justify;margin-bottom:6pt;"><span style="font-size:16pt;font-weight:400;color:rgb(0, 0, 0);">LoRa GPS Tracker Working</span></h2><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">In our previous blogs we have discussed how LoRa modules work and how they are ideal for low power wireless applications. To establish a connection between any LoRa module and The Things Network, a primary prerequisite is a LoRa gateway. </span><a href="https://www.campuscomponent.com/blogs/post/getting-started-with-lora-a-beginner-s-guide-to-building-iot-projects-with-lora-technology"><span style="font-size:11pt;">Learn more about LoRa in IOT.</span></a></span></p><p><span style="font-size:11pt;"><span style="width:547px;"><img alt="GPS Tracking Working" src="https://lh7-us.googleusercontent.com/oVHfdGeMqPkxDgT8D_BZbLXxATVy0olzR5_ScNY1FcvzO6zD0YK5fWf0Rby2dGh-HKuvwv6yKOQqg5R_vgii-hXPXKQp9YUh2se63c6l8_jHFAQF02OVKnlVAcAgRHGal5CfHCJhGM97tKJOt3BeQg" width="547" height="274" style="width:615px !important;height:308px !important;max-width:100% !important;"></span></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">The project has simple working: the ESP8266 serves as the primary controller. It gets/collects information from the Neo-6M GPS Module, transforming Latitude and Longitude data into a LoRa Packet. This packet is then transmitted to the HPD13A LoRa module, establishing a connection with a nearby gateway. Once linked to a LoRa gateway, the packet is forwarded to The Things Network, where the raw data can be viewed on the Things Network Dashboard. To enhance functionality, we've implemented a webhook integration, allowing the position data to be seamlessly sent to Ubidots. Leveraging this information on Ubidots enables us to create a user-friendly map interface for visualizing our location data.</span></p><h2 style="text-align:justify;margin-bottom:6pt;"><span style="font-size:18px;font-weight:400;color:rgb(0, 0, 0);">ESP8266 integrated with LoRa GPS Tracker Circuit Diagram is shown below</span></h2><p><span style="font-size:11pt;"><span style="width:507px;"><img alt="GPS Tracker Circuit Diagram" src="https://lh7-us.googleusercontent.com/X5lN9lKlBNo_jya3CdUdLBzneHmrVbg5ltzmJuou7WIiVvaDnpAZl69k0-aId7ycKqLAw-5J3lyVRmhWDDw8F1Fl9cHIHM_oACvjy6KQvbugv9t5MYVXVt57Y5DdroRloOwZpTDRXWgp92TwnaYPpQ" width="507" height="498"></span></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">The connections for the Nodemcu LoRa GPS Tracker with ESP8266 are shown above in the circuit diagram. We use an LM2596 Step-Down Converter to lower the input voltage, ranging from 9-12V from a Li-Po Battery, to 4.2V. This lower voltage powers both the ESP8266 and the Neo-6M GPS Module. The LoRa module receives power from the ESP8266 at 3.3V and communicates through the SPI Pins. When uploading the code to the ESP8266, ensure the Neo-6M is disconnected since it is connected to the hardware serial pins of the ESP8266 during this process.</span></p><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><br></span></p><h2 style="text-align:justify;margin-bottom:6pt;"><span style="font-size:16pt;font-weight:400;color:rgb(0, 0, 0);">Setting Up End Node on The Things Network</span></h2><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">To begin, sign up on The Things Network by creating either an individual or a student account, both are free. When choosing the LoRa Cluster, opt for the EU Cluster if you're not situated in North America or Australia. After successfully creating your account and completing the email verification, you'll gain access to the TTN Console, which is as shown below.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:526px;"><img alt="Things Network Dashboard" src="https://lh7-us.googleusercontent.com/Ja5pKosxBEWwNInsjlD6JfzaU0VQbCst1GUDnCK6YSDb5Ca1FaNgRKHsU1hilHQYqdZcMO2io3bQ0jPJt7In5tPAz3hDgEVSTbTtYj2qtekjpAeZzzhHd0kZgazqW9f_4ewzQUF17PBN8DXR9qNqdw" width="526" height="265"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Click -&gt; create application -&gt; Enter unique application ID -&gt; application name -&gt; create.</span></p><p><span style="font-size:11pt;"><span style="width:522px;"><img alt="Things Network Add Application" src="https://lh7-us.googleusercontent.com/Bc4RTfc21uhleFzfwh9L2CpIQvo9wNWvsU9s3Gfwoo5flBw4X4UsXh92CJv7H27CJURiZfX1Lkub-9m1lITKQRov0L8AM2Gs6lMgHF1LvXVvpur-XfW9zierVgcuAWlTARrKxFT1HljduEjaC1wxBQ" width="522" height="294"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">When your application gets created go to add an end device.</span></p><p><span style="font-size:11pt;"><span style="width:468px;"><img alt="Things Network Add End Device" src="https://lh7-us.googleusercontent.com/-gebsoQQmynQF-Jy0PhQKtk5Afwu5MjB--k1T4zJ1eAVESaZveaDN6QaHcf2y4Ain3q73qtLRA4ixCzv4Tx8AIXZKiQDswCbMDL_xJYZVIOyjF_Yt4fdAz72p65oNgP1iDuX5JGEeH6nzN1XI40wcQ" width="468" height="263"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">C</span><span style="color:rgb(0, 0, 0);font-size:11pt;">lick -&gt; Manually -&gt;&nbsp; Enter parameters -&gt; generate the DevUI, AppEUI, AppKey, -&gt; complete the end device creation.</span></p><p><span style="font-size:11pt;"><span style="width:579px;"><img alt="Things Network Register End Device" src="https://lh7-us.googleusercontent.com/R2CGYO3U2jR185mHPZo_prOeLB7rluS8L3VTE6tR6w9Hz9sciJ995GrUgZMvZtcX_PPWY3UcD__8nlVjMgw_5FAAMrkMsrUR0Z_kg2bSfehM5f5e3rZ2ja4pIZ1kMUKODYvf-JE2EdrYLGnV8-NL1w" width="579" height="326"></span></span></p><p><span style="font-size:11pt;">Switch to “Payload Formatters” once your device gets created</span></p><p><span style="font-size:11pt;"><span style="width:522px;"><img alt="Things Network Payload Formatters Tab " src="https://lh7-us.googleusercontent.com/w3MPEpASQ7ppGQC42KNLzOwWsm1fCBoqWUz60jJj6sKsxJ9dFhcnyZo3YUxcOYEdTQ5pHc0ma2KG-U2m78T4edixi5MT8RRsRKuseUyaCp8BQypbJf9OJ7NLU-Q4HMDSVgUdN7iBzozqCZDchbldlg" width="522" height="294"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Choose &quot;Custom JavaScript formatter&quot; under the Formatters Type option, and insert the provided code below:.</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">function Decoder(bytes, port) {</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;var result = &quot;&quot;;</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;var result1 = &quot;&quot;;</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;var result2 = &quot;&quot;;</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;for (var i = 0; i &lt; bytes.length; i++) {</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;if(String.fromCharCode(bytes[i])=='X') {</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;break;</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;}</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;else {</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;result += (String.fromCharCode(bytes[i]));</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;}</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;}</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;var myArray = result.split(&quot;,&quot;);</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;result1=myArray[0];</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;result2=myArray[1];</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;return {</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;&quot;position&quot;: { &quot;value&quot;:1, &quot;context&quot;:{&quot;lat&quot;:result1.trim(),&quot;lng&quot;:result2.trim()}}&nbsp;</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;};</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:562px;"><img alt="Things Network Payload Formatters Code" src="https://lh7-us.googleusercontent.com/w3MPEpASQ7ppGQC42KNLzOwWsm1fCBoqWUz60jJj6sKsxJ9dFhcnyZo3YUxcOYEdTQ5pHc0ma2KG-U2m78T4edixi5MT8RRsRKuseUyaCp8BQypbJf9OJ7NLU-Q4HMDSVgUdN7iBzozqCZDchbldlg" width="562" height="316"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Now that we've set up our end device on the Things Network, let's move on to programming the ESP8266. Open the device overview and copy the DevUI, AppEUI, and AppKey. Make sure to set the LSB order for DevUI and AppEUI, and the MSB order for AppKey.</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:537px;"><img alt="Things Network Device Overview" src="https://lh7-us.googleusercontent.com/ULxiUqBzAqBA6DyqVW68qZ_WvvvYIUFJbCGzRZMSgtX_Q-ymeUH3ayTqopzkKHlFcouN-lYaCbD-JKsCjXd27ad8UfcOXaD55Agv94Ws4Zq4hQdoUXovodfq-baMWXr1j2M6ytlsYn-knK3LabVwwA" width="537" height="302"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Open the ESP8266 code (given at the end of the blog) in&nbsp; Arduino IDE and paste those IDs in their respective fields in the code.</span></p><p><span style="font-size:11pt;"><span style="width:580px;"><img alt="Arduino IDE" src="https://lh7-us.googleusercontent.com/R9iIr8huZlUF5WXXrh4a2UCf9CnPlRdsSShmY1ZiXatdfn3t_8n3620WaPe32zdHHtVP8cY3xrg8OajnznUXz3XvhtUpts1pj6FohxPyQpm3fs5mvlTrGMg1CEnxR-sHAOqLJgdNMsjJ_UAngw25RA" width="580" height="311"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">After uploading the ESP8266 code, your device will begin transmitting LoRa data to The Things Network, and you can track this activity in the &quot;Live Data&quot; tab.</span></p><p><span style="font-size:11pt;"><span style="width:619px;"><img alt="Things Network Live Data" src="https://lh7-us.googleusercontent.com/zzu80fF22s1E9l5Ytw-cZoqhVv_o3t73_SXbL2XxQsmEzBF7Qk-xR7Pir_9Q7Kj3wwv4jC06a3qn_k8Nn8ecJN_n5U4hEi_zyct3YIai5sP0v_FQZIcwzTvdkLj3apPnfa-_9K6V8xHUVejG5je82Q" width="619" height="294"></span></span></p><h2 style="text-align:left;margin-bottom:6pt;"><span style="font-size:18px;font-weight:400;"><br></span></h2><h2 style="text-align:left;margin-bottom:6pt;"><span style="font-size:18px;font-weight:400;color:rgb(0, 0, 0);">Ubidots Connection Setup For Data Visualization</span></h2><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Now that our data is reaching TTN, let's integrate a Ubidots Dashboard. Since our data includes Latitude and Longitude Coordinates, we can use Ubidots' Maps Widget. To begin, create a Ubidots STEM account and open your dashboard.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Select -&gt; Devices Menu -&gt; Select&nbsp;Plugins.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:596px;"><img alt="Ubidots Dashboard" src="https://lh7-us.googleusercontent.com/qwXXO3cllkk-kvcdbdxZVyObPXJHAhsgQ8-g5m073fDB4xvT2KV8evbwLtS6brCvicItyUssHMNMiv4VCX725QvSKR-RViaBeYDFnSeHXnXxQ5cS4wBvuvEvY_oOSQ3SRlpdEYVlFtr8SuhWuqPBvg" width="596" height="269"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Search and select -&gt; “The Things Stack” option</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:561px;"><img alt="Ubidots Plugins" src="https://lh7-us.googleusercontent.com/x6p9u7f48A7SVtsVbmYRK8o4zC66yMm4mJzI9QjQCGW7Z-X2er-3zdCu2HBf8W0i88oizPizPbfOUnEZ2NNyh-u2R9WkcEUyOXix6gbeUscRmV0_5H257F4zvx6vDXz3Z08BOcSFTWEcf3or2d_lug" width="561" height="272"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Leave the rest of settings to default and select the Ubidots Token as Default Token</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:564px;"><img alt="Ubidots Token" src="https://lh7-us.googleusercontent.com/1p6lnL5kAR7O5Fx_e2WWzP4a0NHOB1PEhUkDZNCSN9_COGO1DOQbNSAJ1HYurHM94UjyR_S11keC0JH3CFWRSHfEUxSlR8ENf1bj6SRiIsORIULowna3VX8FWAPj7GgDCEw1Sy45wgS51n6SkNRcSw" width="564" height="272"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Add the name and description of the plug-in -&gt; Click on Create.</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:631px;"><img alt="Ubidots Name and Description" src="https://lh7-us.googleusercontent.com/jq4aUYE0sV3bJAxCW9Wp99YiwHB5vjEEh8Y8oETRcILV6WX83VDoptbRRz8mRhnobnvO3HeIBnMl_xZoyfIG4Q9SWStDWgEgLM51v0ZysKo9ezR2SJD1Rd292XlJFwTKIZX7QcxZNd2NB6icYp5dHQ" width="631" height="292"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Your plugin is now active next click on the &quot;Edit Plugin&quot; option.</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:559px;"><img alt="Ubidots Plugin Edit" src="https://lh7-us.googleusercontent.com/bk4ITbXQxQvZZJXT5ITMGodi2Id4yzlG_WS8Lexz9WJ3vRggZROhYoUqO9whBLQRheV_J6OD2ft0zIUrhlqcEGTiDnRlG8VGx2G5QEEo5AD5Fbeb2VTMkBbE4VSaxYxN7N0QZXm8D-G3Mg4XEsj2bw" width="559" height="261"></span></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">In the decoder settings, find the HTTPs Endpoint URL. This URL is where we'll set up the TTN Server to send data packets. Copy the Plugin ID, which is the part of the URL that comes after the /api/webhook/ section.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:624px;"><img alt="Ubidots Decoder Settings" src="https://lh7-us.googleusercontent.com/AvLtzMkD-26bGLiwN3P_ZNl889cXT83gTMoFpOTMGnz5rsPQ8xTiJuTyPFqkvyaJ7iDzFZpCnboZhVfVV9u5b42aTcXgaF6HaC8d_ZdPhdMQzIMGNf2JQW4GBTZQhpAMdapEnyB4zpxJiRjwIw8rNw" width="624" height="286"></span></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">After completing the previous steps, scroll down to the Decoder Function panel and uncomment the following line of code.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">//var decoded_payload = args['uplink_message']['decoded_payload'];</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">//Also, comment on the following two lines.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">//let bytes =&nbsp; Buffer.from(args['uplink_message']['frm_payload'], 'base64');</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">//var decoded_payload = decodeUplink(bytes)['data'];</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="color:inherit;"><br></span></p><p><span style="font-size:11pt;"><span style="width:665px;"><img alt="Ubidots Decoding Function" src="https://lh7-us.googleusercontent.com/CmV3VpgAJu_zzqtSQZOgz-veUgj3mcyfOGMymdzoryLRQmF3fa_XckMCba2xdQ450M0K30btBBPUpY2xR2n3XxGJtGvbhYDVJB8ND8S5eYcBrXN_xwfWWSX35VOLG1qpZ6nUAwacbfWlNUuUpn-isg" width="665" height="138"></span></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Select the &quot;Save &amp; Make Live&quot; button. Our integration is now set up on the Ubidots side. Before going to TTN, navigate to the API credentials option in your profile menu and copy the default token this will be useful later on.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:639px;"><img alt="Ubidots API credentials" src="https://lh7-us.googleusercontent.com/TfdHMV4uzIxULz_GAjer83Zz8H9l4UDgb7N1qoqJphDyNAAtH84FfYrGWsnau8Z8M08bq6YzKXZ8RZXcwsAIyNmZLY7MsFVSfEBxTRXK0ISeTLSuVL7hIdvYTE41N9ID4_EksWmyfQNaE967rVrZLQ" width="639" height="305"></span></span></p><p><span style="font-size:11pt;">Open TTN Application -&gt; Integrations panel -&gt; Webhooks -&gt; Add Webhook&nbsp;button.</span></p><p><span style="font-size:11pt;"><span style="width:649px;"><img alt="Things Network Webhooks" src="https://lh7-us.googleusercontent.com/X0OG5DICGI9YFcgi04mNh_9vRS0uYUXpxO4p3Qvd3Wr82Kxwc5PEE0EPucCkQVAxy1vMVHaOsmkkLLO5Sfi7q9ugkquKQTCMC1Ej9QTDL-dWCyzEhkok304S6K2JZr37WVTtEcujjAaoPIr87u3nRg" width="649" height="303"></span></span></p><p><span style="font-size:11pt;">Select the Ubidots plugin from the given options.</span></p><p><span style="font-size:11pt;"><span style="width:593px;"><img alt="Things Network Ubidots plugin" src="https://lh7-us.googleusercontent.com/Lt0vOHh7Ws-tR55IOP8E4KhpYgeBfiGvuTMkXsH-A_ZYRnJslVjYSc8NH8IZ8D24gn1Qm03hc0owQHoyFMACYuV_BJ71NBhb6hrH5A1pjSpYftxgl-u--DvmRXH9gT74VpB6K4o0vUliNiX7mljsOA" width="593" height="291"></span></span></p><p><span style="font-size:11pt;">Further enter your Plugin ID and your Ubidots Token.</span></p><p><span style="font-size:11pt;"><span style="width:600px;"><img alt="Things Network Setup Webhooks for Ubidots " src="https://lh7-us.googleusercontent.com/OFZQKmdk15SFHq16fRouHcUNgvsQVToOwKjQLPJ4igPWx5eSuS42N72Vzqq8sEavxWtzbsiL4TNrqyW3kOeahRD6JCb52bDwU7y_hN3qPE0hHTqV-gKexwt09w66X3fq4XL7qXZsunRv84uN-csPoQ" width="600" height="283"></span></span></p><p><span style="font-size:11pt;">And that’s it your integration webhook is successfully created</span></p><p><span style="font-size:11pt;"><span style="width:578px;"><img alt="Things Network Webhooks Integration" src="https://lh7-us.googleusercontent.com/0ZRD7xccABDlhFUevmGkXG3m0Ga_lRkF_YqI_5OAaWU3RdpEZVI4WLM11MULkpnNicGeEzzOcqZLts6gU_1PoI0gVnGGgo0xUh2CXMgpRsU9b0PkdOXCn0W6T8NmNrW4jucmEObkxRzyIQIbikN4Qg" width="578" height="278"></span></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">After completing this integration, our LoRa device will transmit data to our TTN Server. Open your Ubidots dashboard, and on the Devices page, your device will be seen here.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:590px;"><img alt="Ubidots Server" src="https://lh7-us.googleusercontent.com/53vKVx4pfe0MYBAIXmVpEFJA8qz7LzI74kokNxK4K0MM878sKu-_ZBGlSzPI2kJxCT9KPDaqsR1FWtRM-QQgkXLCmxz3cSynEsJi7Kw1teo8okojGBxP_J53kL6sZ7h1lXY3OydoixdrniPlmAx7ZQ" width="590" height="280"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Final step is to add a Map Widget to your dashboard. Select -&gt; Data&nbsp;Tab -&gt; Dashboards -&gt; Create Widget&nbsp;Button.</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:537px;"><img alt="Ubidots Map Widget" src="https://lh7-us.googleusercontent.com/gyJLEIOR3QK0e7w-b928ug-_PVfNmpiOExPdCnCflOeZ139Y7F0GblyHhOGywKKyMv0kZ9GCN2BduRb5nKCtjdj64FSZmeGBcY_bbmOk43mz6QeBoC6msyrhQbqVtBT1d__iVAKEmMRMdfwiJuTQkQ" width="537" height="256"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Add new Widget -&gt; Map</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:415px;"><img alt="Ubidots Add Widget" src="https://lh7-us.googleusercontent.com/vqGlg3VUabSEAZmKBpzN8ZbS-rnML0GMvDLYJfVUNDbKsKjfrPJsD-zC4Iirngu_S4JU-s9zf2AqGh-n58BpYEcDJWNG1_cT0n5pwD7-fQC5qrmKE_KVuBnoPjXIFuKdaiYggs47t5Nmz-7EzRhO9g" width="415" height="427"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Select Add Marker Group.</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:346px;"><img alt="Ubidots Add Marker Group" src="https://lh7-us.googleusercontent.com/_1YFZD3pkY-j-oWgkAQ3xZZZ3ULlmCRMm76z1SzcpDoIHtJQNfWVr55hENUvRVVaOnxOzsU6MFew080W3MNhvfHevFOMT4uzNsvhmAhWjG1ZaWcHq-wXy54U8cMNV1T9Oakd3XuMhsGJU-lKQDLA8g" width="346" height="357"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Select your LoRa Device.</span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:549px;"><img alt="Ubidots LoRa Devices" src="https://lh7-us.googleusercontent.com/eB3X2u9tDhJQ2mpqIHqq_68ZYq_zWLN1B4dJ8fGcmyx68JazYrdwHsj_oeSs2FxWZOl_ZvW6e-0P6dW9VHxcMJNSQUBgPtYY-qrhE3UkzwhnkJIgEhyRrQpBr6oyZdORAnK7M7NHkdTh8FjfIZ8OkQ" width="549" height="336"></span></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:left;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Customize the Map Trace settings as per your preferences and then click on the Save button.Top of Form</span></p><p><span style="color:inherit;"><br></span></p><p><span style="font-size:11pt;"><span style="width:652px;"><img alt="Ubidots Map Trace settings" src="https://lh7-us.googleusercontent.com/Gm-Ud4LyIKj5LSXU4shu48Lha7K2_8KVms04m6KdMDZLm6XzdkGDWo7hk0yIEj6zT34RIp25V9l5nLJKdJzFho-oWPE3LdPZUytlaebNKaFfxu3Lyd4W3FMp5qw1RRXsl6InCnt1IuusK4OiqhQLyA" width="652" height="387"></span></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">That's all! Now, all the location and tracking data from the LoRa device will appear on the map widget as location markers. You can also edit your dashboard by adding other widgets like tables to display appropriate coordinate values.</span></p><p style="text-align:justify;"><span style="color:inherit;"><br></span></p><p><span style="font-size:11pt;"><span style="width:659px;"><img alt="Ubidots GPS Tracking" src="https://lh7-us.googleusercontent.com/_oIQ29YF-I2b9Xfh46yMMTBd__vljAVOmPTpA63xFRZmvzCnISMlZiDiNDPCITZcoZod2UEi16MCryPkoerb1EVq1xX698Av4KXt6L-HUK9qhMDcWMN_fxqlx_Hm-MHb-oTCzyWOfHdO0MsdtF8hQA" width="659" height="321"></span></span></p><h2 style="text-align:justify;margin-bottom:6pt;"><span style="font-size:18px;font-weight:400;color:rgb(0, 0, 0);"><br></span></h2><h2 style="text-align:justify;margin-bottom:6pt;"><span style="font-size:18px;font-weight:400;color:rgb(0, 0, 0);">Working Of Our LoRA Based Low power GPS Tracker with ESP8266</span></h2><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">The image below depicts the physical setup and shows how the latitude and longitude values are updated on Ubidots. The range of our LoRa GPS tracker relies on the availability of LoRa Gateways available in the area. As long as a gateway is within reach of your LoRa module, you'll be able to successfully send data to Ubidots.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"><br></span></p><p><span style="font-size:11pt;"><span style="width:470px;"><img alt="GPS Tracker Demo" src="https://lh7-us.googleusercontent.com/9FWEwhh0gqeQV1xytS2XgbZ6NAYf3NJckk36DhlZbtNzri3Dwo41SnP_Eo3KTw1Saa5bcF0Hooaqturwg4G46GSTmitljPpor0cf6PJTeR45gRm9e7EBt_f2JPqunvuI71VXXFA9TMhZzFzm5d-XSQ" width="470" height="265"></span></span></p><h3 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:14pt;color:rgb(0, 0, 0);">ESP8266 Code</span></h3><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">#include &lt;lmic.h&gt;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">#include &lt;hal/hal.h&gt;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">#include &lt;SPI.h&gt;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">#include &lt;TinyGPSPlus.h&gt;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">TinyGPSPlus gps; String ProcData=&quot;Hello,World&quot;;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">#ifdef COMPILE_REGRESSION_TEST</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"># define FILLMEIN 0</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">#else</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"># warning &quot;You must replace the values marked FILLMEIN with real values from the TTN control panel!&quot;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);"># define FILLMEIN (#dont edit this, edit the lines that use FILLMEIN)</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">#endif</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// This EUI must be in little-endian format, so least-significant-byte</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// first. When copying an EUI from ttnctl output, this means to reverse // the bytes. For TTN issued EUIs the last bytes should be 0xD5, 0xB3,</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// 0x70. static const u1_t PROGMEM APPEUI[8]= {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; void os_getArtEui (u1_t* buf) { memcpy_P(buf, APPEUI, 8);}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// This should also be in little endian format, see above.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">static const u1_t PROGMEM DEVEUI[8]= {0x36, 0x52, 0x05, 0xD0, 0x7E, 0xD5, 0xB3, 0x70};</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">void os_getDevEui (u1_t* buf) { memcpy_P(buf, DEVEUI, 8);}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// This key should be in big endian format (or, since it is not really a</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// number but a block of memory, endianness does not really apply). In</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// practice, a key taken from ttnctl can be copied as-is.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">static const u1_t PROGMEM APPKEY[16] = {0x97, 0x7B, 0x4B, 0xA3, 0x9A, 0x8D, 0x33, 0x5E, 0x42, 0x13, 0x9C, 0x6B, 0xE9, 0xF9, 0x5E, 0xE1};</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">void os_getDevKey (u1_t* buf) { memcpy_P(buf, APPKEY, 16);}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">uint8_t mydata[25] ;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">static osjob_t sendjob;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// Schedule TX every this many seconds (might become longer due to duty</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// cycle limitations). const unsigned TX_INTERVAL = 2;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// Pin mapping</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">const lmic_pinmap lmic_pins = {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;.nss = 15,</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;.rxtx = LMIC_UNUSED_PIN,</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;.rst = 16,</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;.dio = {5, 4, LMIC_UNUSED_PIN},</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">};</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">void printHex2(unsigned v) {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;v &amp;= 0xff;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;if (v &lt; 16)</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; Serial1.print('0');</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;Serial1.print(v, HEX);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">void onEvent (ev_t ev) {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;Serial1.print(os_getTime());</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;Serial1.print(&quot;: &quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp;switch(ev) {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; case EV_SCAN_TIMEOUT:&nbsp; &nbsp; &nbsp;Serial1.println(F(&quot;EV_SCAN_TIMEOUT&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; case EV_BEACON_FOUND: Serial1.println(F(&quot;EV_BEACON_FOUND&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; case EV_BEACON_MISSED: Serial1.println(F(&quot;EV_BEACON_MISSED&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; case EV_BEACON_TRACKED: Serial1.println(F(&quot;EV_BEACON_TRACKED&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; case EV_JOINING: Serial1.println(F(&quot;EV_JOINING&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; case EV_JOINED: Serial1.println(F(&quot;EV_JOINED&quot;)); {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;u4_t netid = 0; devaddr_t devaddr = 0;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;u1_t nwkKey[16];</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;u1_t artKey[16];</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;LMIC_getSessionKeys(&amp;netid, &amp;devaddr, nwkKey, artKey);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;Serial1.print(&quot;netid: &quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;Serial1.println(netid, DEC);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;Serial1.print(&quot;devaddr: &quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;Serial1.println(devaddr, HEX);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;Serial1.print(&quot;AppSKey: &quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;for (size_t i=&quot;0;&quot; i&lt;sizeof(artKey); ++i) {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp; if (i != 0) Serial1.print(&quot;-&quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp; printHex2(artKey[i]);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; Serial1.println(&quot;&quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; Serial1.print(&quot;NwkSKey: &quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; for (size_t i=&quot;0;&quot; i&lt;sizeof(nwkKey); ++i) {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;if (i != 0) Serial1.print(&quot;-&quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; &nbsp;printHex2(nwkKey[i]);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; }</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">&nbsp; Serial1.println(); }</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// Disable link check validation (automatically enabled</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// during join, but because slow data rates change max TX</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// size, we don't use it in this example. LMIC_setLinkCheckMode(0); break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">/* || This event is defined but not used in the code. No || point in wasting codespace on it. || || case EV_RFU1: || Serial1.println(F(&quot;EV_RFU1&quot;)); || break; */</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_JOIN_FAILED: Serial1.println(F(&quot;EV_JOIN_FAILED&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_REJOIN_FAILED: Serial1.println(F(&quot;EV_REJOIN_FAILED&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_TXCOMPLETE: Serial1.println(F(&quot;EV_TXCOMPLETE (includes waiting for RX windows)&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">if (LMIC.txrxFlags &amp; TXRX_ACK) Serial1.println(F(&quot;Received ack&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">if (LMIC.dataLen) {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.print(F(&quot;Received &quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.print(LMIC.dataLen); Serial1.println(F(&quot; bytes of payload&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// Schedule next transmission</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">os_setTimedCallback(&amp;sendjob, os_getTime()+sec2osticks(TX_INTERVAL), do_send);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_LOST_TSYNC: Serial1.println(F(&quot;EV_LOST_TSYNC&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_RESET: Serial1.println(F(&quot;EV_RESET&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_RXCOMPLETE: // data received in ping slot Serial1.println(F(&quot;EV_RXCOMPLETE&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_LINK_DEAD: Serial1.println(F(&quot;EV_LINK_DEAD&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_LINK_ALIVE: Serial1.println(F(&quot;EV_LINK_ALIVE&quot;)); break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">/* || This event is defined but not used in the code. No || point in wasting codespace on it. || || case EV_SCAN_FOUND: || Serial1.println(F(&quot;EV_SCAN_FOUND&quot;)); || break; */</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_TXSTART: Serial1.println(F(&quot;EV_TXSTART&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_TXCANCELED: Serial1.println(F(&quot;EV_TXCANCELED&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_RXSTART: /* do not print anything -- it wrecks timing */</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">case EV_JOIN_TXCOMPLETE: Serial1.println(F(&quot;EV_JOIN_TXCOMPLETE: no JoinAccept&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">default: Serial1.print(F(&quot;Unknown event: &quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.println((unsigned) ev);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">break;</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">void do_send(osjob_t* j){</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// Check if there is not a current TX/RX job running</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">if (LMIC.opmode &amp; OP_TXRXPEND) {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.println(F(&quot;OP_TXRXPEND, not sending&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">else {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// Prepare upstream data transmission at the next possible</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">time. unsigned long start = millis();</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">do {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">while (Serial.available())</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">gps.encode(Serial.read());</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">while (millis() - start &lt; 1000);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">float flat=&quot;gps.location.lat();</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">float flon=&quot;gps.location.ln&quot;g();</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">char charLat[20];</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">char charLong[20];</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.print(&quot;Cords: &quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.print(flat); Serial1.print(&quot; , &quot;);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.println(flon);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">dtostrf(flat, 10, 7, charLat);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">dtostrf(flon, 10, 7, charLong);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">sprintf((char *)mydata, &quot;%s,%sX&quot;, charLat,charLong);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">LMIC_setTxData2(1, mydata,25, 0);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.println(F(&quot;Packet queued&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">//int x=&quot;ProcData.len&quot;gth();</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">//ProcData.toCharArray((char *)mydata,sizeof(mydata));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// Next TX is scheduled after TX_COMPLETE event.</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">void setup() {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.begin(9600);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial1.println(F(&quot;Starting&quot;));</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Serial.begin(9600);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// LMIC init os_init();</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// Reset the MAC state. Session and pending data transfers will be discarded. LMIC_reset(); LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">// Start job (sending automatically starts OTAA too) do_send(&amp;sendjob);}</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">void loop() {</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">os_runloop_once();</span></p><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">}</span></p><h2 style="text-align:justify;margin-bottom:6pt;"><span style="font-size:16pt;font-weight:400;color:rgb(0, 0, 0);">Conclusion</span></h2><p style="text-align:justify;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Thus we have implemented a LoRa based low power GPS tracker with ESP8266, you can track any of your device location using this setup in your project. The same process as above will be followed if you are building a GPS tracker using Nuvoton N032LE3AE. The LoRa-based Low Power GPS Tracker with ESP8266 gives multiple options and ways to enhance your IoT devices. Offering extended battery life, precise location tracking, real-time monitoring, cost-effectiveness, and versatile connectivity.</span></p><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">If you are looking for LoRa Module and </span><a href="https://www.campuscomponent.com/categories/gps/2208614000002321093"><span style="font-size:11pt;">GPS module</span></a><span style="font-size:11pt;"> from brands such as Smatech and Hoperf or microcontrollers from brands like </span><a href="https://www.campuscomponent.com/brand-details/nuvoton"><span style="font-size:11pt;">Nuvoton</span></a><span style="font-size:11pt;"> and Espressif reach out&nbsp;to Campus Component&nbsp;an </span><a href="https://www.campuscomponent.com/"><span style="font-size:11pt;">electronic components distributor</span></a><span style="font-size:11pt;"> today!</span></span></p></div></div>
</div><div data-element-id="elm_HA0N2fXSS_GRASFskizJEQ" data-element-type="button" class="zpelement zpelem-button "><style> [data-element-id="elm_HA0N2fXSS_GRASFskizJEQ"].zpelem-button{ border-radius:1px; } </style><div class="zpbutton-container zpbutton-align-center"><style type="text/css"></style><a role="button" class="zpbutton-wrapper zpbutton zpbutton-type-primary zpbutton-size-md zpbutton-style-none " href="https://www.campuscomponent.com/" target="_blank"><span class="zpbutton-content">Get Started Now</span></a></div>
</div></div></div></div></div></div> ]]></content:encoded><pubDate>Thu, 21 Mar 2024 06:30:05 +0000</pubDate></item><item><title><![CDATA[Zigbee vs. Wi-Fi: Which Is Better For IoT Applications?]]></title><link>https://www.campuscomponent.com/blogs/post/zigbee-vs.-wi-fi-which-is-better-for-iot-applications</link><description><![CDATA[<img align="left" hspace="5" src="https://www.campuscomponent.com/Zigbee vs. Wi-Fi Which Is Better For IoT Applications.jpg"/>When it comes to IoT applications, Zigbee and Wi-Fi are both popular choices for connectivity. Read full article with Campus Component]]></description><content:encoded><![CDATA[
<div class="zpcontent-container blogpost-container "><div data-element-id="elm_e3Lbe1nzQZqvXc7AL3LJ3w" data-element-type="section" class="zpsection "><style type="text/css"></style><div class="zpcontainer"><div data-element-id="elm_ddk8o5OqTC26LjLTwXWd6A" data-element-type="row" class="zprow zpalign-items- zpjustify-content- "><style type="text/css"></style><div data-element-id="elm_zC_vnoCJRDCctob92hhpZA" data-element-type="column" class="zpelem-col zpcol-12 zpcol-md-12 zpcol-sm-12 zpalign-self- "><style type="text/css"> [data-element-id="elm_zC_vnoCJRDCctob92hhpZA"].zpelem-col{ border-radius:1px; } </style><div data-element-id="elm_P9gzXCWTSe-uvJJIKKThqw" data-element-type="heading" class="zpelement zpelem-heading "><style> [data-element-id="elm_P9gzXCWTSe-uvJJIKKThqw"].zpelem-heading { border-radius:1px; } </style><h2
 class="zpheading zpheading-align-center " data-editor="true"></h2></div>
<div data-element-id="elm_nNpUcYD4SaS8JlfzooWoMw" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_nNpUcYD4SaS8JlfzooWoMw"].zpelem-text{ border-radius:1px; } </style><div class="zptext zptext-align-center " data-editor="true"><p style="text-align:justify;margin-bottom:12pt;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<img src="/Zigbee%20vs.%20Wi-Fi%20Which%20Is%20Better%20For%20IoT%20Applications.jpg" style="width:613.2px !important;height:606px !important;max-width:100% !important;" alt="Zigbee vs. Wi-Fi Which Is Better For IoT Applications"><span style="color:rgb(0, 0, 0);font-size:11pt;"><br></span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);font-size:11pt;">With the rise of the Internet of Things (IoT), wireless communication has become crucial for connecting various devices. ZigBee and Wi-Fi are two popular wireless communication protocols used for IoT applications. </span><a href="https://www.campuscomponent.com/categories/wifi_module/2208614000002321101"><span style="font-size:11pt;">Wi-Fi Module</span></a><span style="color:rgb(0, 0, 0);font-size:11pt;"> is commonly used for internet connectivity.</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">However, ZigBee is explicitly designed for low-power wireless communication between devices. This article will compare </span><span style="font-size:11pt;font-weight:700;">ZigBee vs. Wi-Fi</span><span style="font-size:11pt;"> and determine which is better for IoT applications.</span></span></p><h2 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:17pt;color:rgb(0, 0, 0);">ZigBee vs. Wi-Fi</span></h2><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Both ZigBee and Wi-Fi are wireless communication protocols that allow devices to communicate with each other without the need for cables or wires. However, they differ in frequency, range, and power consumption.</span></p><h3 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:13pt;font-weight:700;color:rgb(0, 0, 0);">Frequency</span></h3><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">ZigBee operates on the 2.4 GHz frequency band, also used by Wi-Fi, Bluetooth, and other wireless communication protocols. Conversely, Wi-Fi can operate on multiple frequency bands, including 2.4 GHz and 5 GHz. The 5 GHz frequency band is less crowded than the 2.4 GHz band, which makes it less prone to interference.</span></p><h3 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:13pt;font-weight:700;color:rgb(0, 0, 0);">Range&nbsp;</span></h3><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">One of the critical factors to consider when choosing between ZigBee and Wi-Fi for IoT applications is the range. ZigBee typically has a range of up to 100 meters, making it a suitable option for applications that require communication between devices in a limited range.</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">On the other hand, Wi-Fi can range up to several hundred meters, making it a better option for applications requiring internet connectivity over a larger area.</span></p><h3 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:13pt;font-weight:700;color:rgb(0, 0, 0);">Security</span></h3><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Security is a crucial factor to consider when choosing a wireless communication protocol for IoT applications. Both ZigBee and Wi-Fi offer various security features. Still, Wi-Fi is generally considered more secure.</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">It's due to the availability of various security protocols such as WPA2 and AES encryption. ZigBee, on the other hand, uses its security protocol called ZigBee Security, which provides a basic level of security.</span></p><h3 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:13pt;font-weight:700;color:rgb(0, 0, 0);">Power Consumption</span></h3><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Power consumption is another essential factor when choosing between ZigBee and Wi-Fi. ZigBee is designed to be a low-power wireless communication protocol. Thus, it is ideal for IoT devices that need energy conservation.</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">On the other hand, a </span><a href="https://www.campuscomponent.com/categories/wifi_module/2208614000002321101"><span style="font-size:11pt;font-weight:700;">Wi-Fi module for IoT</span></a><span style="font-size:11pt;"> can consume a lot of power, especially during data transmission, making them less suitable for battery-operated IoT devices.</span></span></p><h3 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:13pt;font-weight:700;color:rgb(0, 0, 0);">Network Topology</span></h3><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">The network topology of an IoT application is also an essential factor to consider when choosing between ZigBee and Wi-Fi. ZigBee is designed to support simple network topologies, making it a good option for applications requiring communication between several devices.</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">On the other hand, the </span><span style="font-size:11pt;font-weight:700;">Wi-Fi module</span><span style="font-size:11pt;"> supports more complex network topologies, making it a better option for applications that require communication between a more significant number of devices.</span></span></p><h3 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:13pt;font-weight:700;color:rgb(0, 0, 0);">Cost</span></h3><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Cost is substantial when choosing a wireless communication protocol for IoT applications, and ZigBee is generally more cost-effective than Wi-Fi, especially for large-scale deployments.</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">This is because ZigBee modules are typically cheaper than Wi-Fi modules, and ZigBee networks require fewer nodes, reducing the overall cost of the system.</span></p><h2 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:17pt;color:rgb(0, 0, 0);">Wi-Fi Module For IoT</span></h2><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">Wi-Fi modules are commonly used for IoT applications that require internet connectivity. Digi key is a famous manufacturer of Wi-Fi modules for IoT applications. One of their products is the </span><span style="font-size:11pt;font-weight:700;">XB24-CZ7WIT-004</span><span style="font-size:11pt;"> Wi-Fi module.</span></span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">It is a low-power module that supports the 802.11b/g/n Wi-Fi standard. It also features an integrated TCP/IP stack, which makes it easy to connect to the internet.</span></p><h2 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:16px;color:rgb(0, 0, 0);font-weight:400;">ZigBee Module For IoT</span></h2><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><a href="https://www.campuscomponent.com/categories/zigbee/2208614000002321097"><span style="font-size:11pt;">ZigBee modules</span></a><span style="font-size:11pt;"> are commonly used for IoT applications that require low-power wireless communication between devices. Digi key is also a famous manufacturer of ZigBee modules for IoT applications.</span></span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">One of their products is the </span><span style="font-size:11pt;font-weight:700;">XB3-24Z8UM</span><span style="font-size:11pt;"> ZigBee module, which is a low-power module that operates on the 2.4 GHz frequency band. It also features an integrated antenna and a range of up to 100 meters.</span></span></p><h2 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:17pt;color:rgb(0, 0, 0);">Advantages Of ZigBee For IoT Applications</span></h2><ul><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Low Power Consumption: </span><span style="font-size:11pt;">ZigBee modules are designed to be low-power, which makes them ideal for battery-operated IoT devices. This means that ZigBee devices can last for months or even years on a single battery.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Simple Network Topology:</span><span style="font-size:11pt;font-weight:700;">ZigBee module </span><span style="font-size:11pt;">uses a simple star or mesh network topology, which makes it easy to set up and maintain.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Low Cost:</span><span style="font-size:11pt;"> ZigBee modules are inexpensive, making them a cost-effective solution for IoT applications.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Suitable For Large-Scale Deployments:</span><span style="font-size:11pt;"> ZigBee is designed for large-scale deployments, making it suitable for industrial and commercial applications.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Robustness</span><span style="font-size:11pt;">: ZigBee is designed to be robust, with built-in mechanisms for dealing with interference, channel hopping, and network congestion. This makes it ideal for applications where reliability is critical.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Security</span><span style="font-size:11pt;">: ZigBee has built-in security features such as AES-128 encryption and device authentication, which make it suitable for applications that require secure communication.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Scalability</span><span style="font-size:11pt;">: ZigBee networks can be easily expanded by adding additional nodes, making them suitable for applications that require scalability.</span></span></p></li></ul><h2 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:17pt;color:rgb(0, 0, 0);">Advantages Of Wi-Fi For IoT Applications</span></h2><ul><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">High Data Transfer Rates:</span><span style="font-size:11pt;"> Wi-Fi can transfer data at high speeds, which makes it suitable for applications that require high bandwidth, such as video streaming.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Wide Range: </span><span style="font-size:11pt;">Wi-Fi is broader than ZigBee, making it suitable for outdoor applications.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Compatibility with Existing Infrastructure:</span><span style="font-size:11pt;"> Wi-Fi is compatible with existing wireless networks and can be easily integrated into existing infrastructure.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Security</span><span style="font-size:11pt;">: Wi-Fi supports various security protocols, including WEP, WPA, and WPA2, which makes it a secure solution for IoT applications.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">High Bandwidth: </span><span style="font-size:11pt;">Wi-Fi has a high bandwidth of up to several hundred Mbps, making it suitable for high-speed data transfer applications.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Easy To Use: </span><span style="font-size:11pt;">Wi-Fi is widely used and understood, which makes it easy for developers to implement and deploy Wi-Fi modules in IoT applications.</span></span></p></li><li style="font-size:11pt;"><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;font-weight:700;">Integration With Other Systems:</span><span style="font-size:11pt;"> Wi-Fi modules can be easily integrated with other systems, such as cloud platforms and mobile applications, making managing and controlling IoT devices more accessible.</span></span></p></li></ul><h2 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:17pt;color:rgb(0, 0, 0);">ZigBee Or Wi-Fi: Which Is Better?&nbsp;</span></h2><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">For applications that require low power consumption and simple network topology, ZigBee is a suitable option. ZigBee is also a cost-effective solution for IoT applications and can be deployed on a large scale. </span><span style="font-size:11pt;font-weight:700;">Digi key</span><span style="font-size:11pt;"> offers various ZigBee modules, including the </span><span style="font-size:11pt;font-weight:700;">XB3-24Z8UM</span><span style="font-size:11pt;"> ZigBee module, a low-power module with a range of up to 100 meters.</span></span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">For applications that require high data transfer rates and compatibility with existing infrastructure, Wi-Fi is a suitable option. Wi-Fi is also a secure solution for IoT applications, supporting various security protocols. Digi key offers various Wi-Fi modules, including the </span><span style="font-size:11pt;font-weight:700;">XB24-CZ7WIT-004</span><span style="font-size:11pt;">, a low-power module that supports the 802.11b/g/n Wi-Fi standard and features an integrated TCP/IP stack.</span></span></p><h2 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:17pt;color:rgb(0, 0, 0);">Conclusion&nbsp;</span></h2><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Both ZigBee and Wi-Fi have their advantages and limitations for IoT applications. Choosing one over the other depends on the application's specific requirements. Also, ZigBee is a cost-effective and low-power option for simple network topologies. However, Wi-Fi provides high-speed data transfer rates and compatibility with existing infrastructure.</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="color:rgb(0, 0, 0);"><span style="font-size:11pt;">Therefore, it is crucial to consider the application's specific requirements before deciding which wireless communication protocol to use. ZigBee and </span><span style="font-size:11pt;font-weight:700;">Digi key </span><span style="font-size:11pt;">Wi-Fi modules can provide reliable wireless communication solutions for various IoT applications.</span></span></p><h2 style="text-align:justify;margin-bottom:4pt;"><span style="font-size:17pt;color:rgb(0, 0, 0);">FAQs</span></h2><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;font-weight:700;color:rgb(0, 0, 0);">1. Can Zigbee and WiFi work together in the same environment?</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Yes, Zigbee and WiFi can coexist in the same environment without interference. However, since both use the same frequency band, it is important to properly configure and manage the networks to avoid interference and ensure optimal performance.</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;font-weight:700;color:rgb(0, 0, 0);">2. Can Zigbee and WiFi devices communicate with each other?</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">No, Zigbee and WiFi are incompatible and cannot directly communicate. However, it is possible to integrate the two technologies using a gateway or hub device that can translate between the two protocols. This allows Zigbee and WiFi devices to communicate through the gateway or hub.</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;font-weight:700;color:rgb(0, 0, 0);">3. What are the limitations of Zigbee compared to WiFi?</span></p><p style="text-align:justify;margin-bottom:12pt;"><span style="font-size:11pt;color:rgb(0, 0, 0);">Zigbee has limited range and data transmission speed, making it unsuitable for applications that require high bandwidth or long-range communication. Additionally, Zigbee devices may have compatibility issues with other wireless technologies.</span></p></div>
</div><div data-element-id="elm_BHBXePl8ShuxbTAeINAYCw" data-element-type="button" class="zpelement zpelem-button "><style> [data-element-id="elm_BHBXePl8ShuxbTAeINAYCw"].zpelem-button{ border-radius:1px; } </style><div class="zpbutton-container zpbutton-align-center"><style type="text/css"></style><a role="button" class="zpbutton-wrapper zpbutton zpbutton-type-primary zpbutton-size-md zpbutton-style-none " href="https://www.campuscomponent.com/categories/wireless_module/2208614000002321087" target="_blank"><span class="zpbutton-content">Get Started Now</span></a></div>
</div></div></div></div></div></div> ]]></content:encoded><pubDate>Tue, 13 Jun 2023 07:01:32 +0000</pubDate></item><item><title><![CDATA[Getting started with LoRa: A beginner's guide to building IoT projects with LoRa technology]]></title><link>https://www.campuscomponent.com/blogs/post/getting-started-with-lora-a-beginner-s-guide-to-building-iot-projects-with-lora-technology</link><description><![CDATA[<img align="left" hspace="5" src="https://www.campuscomponent.com/Getting started with LoRa A beginner-s guide to building IoT projects with LoRa technology.jfif"/>Read Complete guide for a beginner’s to building IoT projects with LoRa technology..!!]]></description><content:encoded><![CDATA[
<div class="zpcontent-container blogpost-container "><div data-element-id="elm_kG9GE4leRtC-G9S1NIWNIg" data-element-type="section" class="zpsection "><style type="text/css"></style><div class="zpcontainer"><div data-element-id="elm_XIfYNzSRS0a7bfZD18IhHg" data-element-type="row" class="zprow zpalign-items- zpjustify-content- "><style type="text/css"></style><div data-element-id="elm_NYx9N5YvSTK82qBSaPqwHQ" data-element-type="column" class="zpelem-col zpcol-12 zpcol-md-12 zpcol-sm-12 zpalign-self- "><style type="text/css"></style><div data-element-id="elm_5CA1ADaiRZeCTxPmm9kCzQ" data-element-type="heading" class="zpelement zpelem-heading "><style> [data-element-id="elm_5CA1ADaiRZeCTxPmm9kCzQ"].zpelem-heading { border-radius:1px; } </style><h2
 class="zpheading zpheading-align-center " data-editor="true"></h2></div>
<div data-element-id="elm_1_2RpSitQ5WMW01Ykd5b7Q" data-element-type="text" class="zpelement zpelem-text "><style> [data-element-id="elm_1_2RpSitQ5WMW01Ykd5b7Q"].zpelem-text{ border-radius:1px; } </style><div class="zptext zptext-align-center " data-editor="true"><div><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);"><img src="/Getting%20started%20with%20LoRa%20A%20beginner-s%20guide%20to%20building%20IoT%20projects%20with%20LoRa%20technology.jfif" style="width:1093.12px !important;height:615px !important;max-width:100% !important;"><br></span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">The Internet of Things (IoT) has been rapidly growing, and with it, there has been an increased demand for long-range, low-power wireless communication technologies. One such technology is <span style="font-weight:700;">LoRa which stands for Long Range</span>. It is a wireless communication protocol that enables long-range communication with low power consumption, making it ideal for IoT devices. In this article, we will take a look at LoRa technology and LoRa module and how you can use it to build IoT projects.</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">What is LoRa?</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);"><span style="font-weight:700;">LoRa</span> is a wireless communication protocol that was developed by Semtech Corporation. It is based on Spread Spectrum Modulation techniques that enable long-range communication with low power consumption. LoRa operates in the unlicensed radio spectrum, which means that it can be used without the need for any license or subscription fees.</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">How does LoRa module work?</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">LoRa module works by using a modulation technique known as <span style="font-weight:700;">Chirp Spread Spectrum (CSS)</span> using Star Network Topology. CSS enables LoRa module to transmit data over long range while consuming very little power. The data is transmitted by modulating a carrier signal with a chirp waveform. The chirp waveform is a linearly varying signal whose frequency increases or decreases with time. This modulation technique enables LoRa module to achieve long-range communication while using very low power.</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">Getting started with LoRa Module:</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">To get started with LoRa, you will need a few things:</span></p><ul><li style="font-size:12pt;"><p style="text-align:justify;"><span style="font-size:14px;color:rgb(0, 0, 0);">A LoRa module</span></p></li><li style="font-size:12pt;"><p style="text-align:justify;"><span style="font-size:14px;color:rgb(0, 0, 0);">A LoRa gateway</span></p></li><li style="font-size:12pt;"><p style="text-align:justify;"><span style="font-size:14px;color:rgb(0, 0, 0);">A computer with an internet connection</span></p></li><li style="font-size:12pt;"><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">A programming environment such as Arduino IDE.</span></p></li></ul><p></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">Step 1: Choose a LoRa module</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">The first thing you will need is a LoRa device. There are many different LoRa devices available, each with its own features and capabilities. Some popular options include the NLN500 Lora Module, and the Dragino LoRa Shield.</span></p><p style="text-align:justify;"><span style="font-size:14px;color:rgb(0, 0, 0);"><br></span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;"><span style="width:458px;color:rgb(0, 0, 0);">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src="https://lh4.googleusercontent.com/q7RRX83hS1oSuqtH3Bk9T075Wfa9V-FXAZ2PISB9YrFcx1cxDSAAksD_im4v3q_pCM1Q-2u1AtH0CFZGkGxXUcvYYP_vqgeV6Zp3LORtu0K9aEEzJ7kNv7KlvxGskWr3NnXH9lDy7XI8zQ3PmclP-g" width="458" height="242" style="width:565.91px !important;height:299px !important;max-width:100% !important;"></span></span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">The NebuLink Node NLN500a is First and Smallest STM32WL Based LoRa Module.&nbsp;<span style="font-weight:700;">LoRa Module</span>&nbsp;is build on the STM32WL SoC which has Embedded LoRa WAN Transceiver for wide range of Smart Applications. It is useful when long range is required as it operates at 868 MHz &amp; 915 MHz Band and uses Lo–Ra(Long-Range) Protocol for communication.</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">Get the high-quality&nbsp;LoRa Module&nbsp;Module&nbsp;at the best price in India.</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">Step 2: Choose a LoRa gateway</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">The next thing you will need is a <span style="font-weight:700;">LoRa gateway</span>. A LoRa gateway is a device that receives data from LoRa devices and sends it to a server. There are many different LoRa gateways available, each with its own features and capabilities.</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">Step 3: Set up your LoRa device and gateway</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">Once you have your LoRa device and gateway, you will need to set them up. This will involve configuring the LoRa device to communicate with the LoRa gateway. Each LoRa device and gateway will have its own set of instructions for configuration.</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">Step 4: Write code for your LoRa device</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">After you have set up your LoRa device and gateway, you will need to write code for your LoRa device. This will involve using a programming environment such as Arduino IDE to write code that sends data to the LoRa gateway. Your code will be varying as per the sensor you are using i.e. Digital oir Analog.</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">Step 5: Send data to the LoRa gateway</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">Once you have written code for your LoRa device, you can begin sending data to the LoRa gateway. The LoRa gateway will receive the data and send it to a server, where it can be stored and analyzed. This data can be used to monitor and control IoT devices, track assets, and perform many other tasks.</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;font-weight:700;color:rgb(0, 0, 0);">Conclusion</span></p><p style="text-align:justify;margin-bottom:10pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">LoRa is an excellent technology for building IoT projects that require long-range communication and low power consumption. With the LoRa module, a LoRaWAN gateway, and the appropriate servers, you can build a wide range of IoT projects, from environmental monitoring to big factory projects.</span></p><p style="text-align:justify;margin-bottom:9pt;"><span style="font-size:14px;color:rgb(0, 0, 0);">If you are looking for <span style="font-weight:700;">LoRa Module</span> and different microcontrollers like <span style="font-weight:700;">Arduino, ESP32, Raspberry-Pi</span>,&nbsp; reach out&nbsp;to <a href="https://www.campuscomponent.com/">Campus Component</a>&nbsp;today!</span></p><p style="text-align:justify;margin-bottom:10pt;"></p><p><span style="font-size:14px;"><span style="color:inherit;"></span></span></p></div><p style="text-align:justify;margin-bottom:10pt;"></p><p><span style="font-size:14px;"><span style="color:inherit;"></span></span></p></div>
</div><div data-element-id="elm_Q0okqirhRsK7jaRuYNxAIQ" data-element-type="button" class="zpelement zpelem-button "><style> [data-element-id="elm_Q0okqirhRsK7jaRuYNxAIQ"].zpelem-button{ border-radius:1px; } </style><div class="zpbutton-container zpbutton-align-center"><style type="text/css"></style><a role="button" class="zpbutton-wrapper zpbutton zpbutton-type-primary zpbutton-size-md zpbutton-style-none " href="https://www.campuscomponent.com/categories/lora/2208614000002321105" target="_blank"><span class="zpbutton-content">Get Started Now</span></a></div>
</div></div></div></div></div></div> ]]></content:encoded><pubDate>Mon, 20 Mar 2023 11:48:52 +0000</pubDate></item></channel></rss>