<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jordy Moors</title>
    <description>The latest articles on DEV Community by Jordy Moors (@moors7).</description>
    <link>https://dev.to/moors7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F168743%2F5c2f4c27-e138-4bdb-80b1-f0d94df801e8.png</url>
      <title>DEV Community: Jordy Moors</title>
      <link>https://dev.to/moors7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moors7"/>
    <language>en</language>
    <item>
      <title>Build this Wi-Fi thermometer for your workshop using a Gen 3 Argon and a Grove Starter Kit</title>
      <dc:creator>Jordy Moors</dc:creator>
      <pubDate>Fri, 14 Jun 2019 13:00:30 +0000</pubDate>
      <link>https://dev.to/particle/build-this-wi-fi-thermometer-for-your-workshop-using-a-gen-3-argon-and-a-grove-starter-kit-2nfl</link>
      <guid>https://dev.to/particle/build-this-wi-fi-thermometer-for-your-workshop-using-a-gen-3-argon-and-a-grove-starter-kit-2nfl</guid>
      <description>&lt;p&gt;In this tutorial, you’ll make a simple Wi-Fi thermometer using the &lt;a href="https://store.particle.io/products/argon-kit"&gt;Particle Argon&lt;/a&gt; and the &lt;a href="https://store.particle.io/products/grove-starter-kit"&gt;Grove Starter Kit for Particle Mesh&lt;/a&gt;. The goal is to measure the current temperature, display that value on a display, and an RGB LED to give a visual warning if the temperature crosses a predefined threshold. Thanks to the ease of use of the Grove system, this should be an accessible project even if you’re just starting out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Required hardware
&lt;/h2&gt;

&lt;p&gt;In order to follow along with this guide, you’ll need the following items.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;(1) Particle Argon — this project assumes you’ve set up your Argon. If you’ve not done that yet, follow the instructions here before you begin this project.&lt;/li&gt;
&lt;li&gt;(1) Grove Starter Kit for Particle Mesh — the kit comes with a number of different sensors. This project will use the follow parts from the kit:

&lt;ul&gt;
&lt;li&gt;(1) Grove shield for Particle Mesh&lt;/li&gt;
&lt;li&gt;(1) temperature and humidity sensor&lt;/li&gt;
&lt;li&gt;(1) chainable RGB LED V2&lt;/li&gt;
&lt;li&gt;(1) 4-digit display&lt;/li&gt;
&lt;li&gt;(3) Grove wires&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hardware assembly
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QqBF2mA3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/Grove-temp-blue-LED-crop-1024x768.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QqBF2mA3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/Grove-temp-blue-LED-crop-1024x768.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Assembly of the project requires zero soldering. In my build, I got a bit fancy and decided to repurpose the Grove kit box as an enclosure. I won’t cover the exact steps to build the enclosure, but will say that when you work with cardboard, measure twice and cut with several passes of your cutting tool.&lt;/p&gt;

&lt;h4&gt;
  
  
  Connect your Grove sensors
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LLZYdOXf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/Grove-temp-project-interior-crop-1024x768.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LLZYdOXf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/Grove-temp-project-interior-crop-1024x768.png" alt="I used the box from my Grove kit as an enclosure. Just add tape and a bit of patience."&gt;&lt;/a&gt;I used the box from my Grove kit as an enclosure. Just add tape and a bit of patience.&lt;/p&gt;

&lt;p&gt;The main step in this project is to connect all the sensors to the Grove FeatherWing. Building with the Grove system is quick and efficient. Plus, each of the Grove wires are notched with a small piece of plastic, so it’s physically impossible to connect the Grove cables the wrong way. Here’s a chart for the connections I used in the project.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Grove FeatherWing port&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Sensor&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;D2&lt;/td&gt;
&lt;td&gt;4-digit display&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A2&lt;/td&gt;
&lt;td&gt;Temperature &amp;amp; Humidity sensor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UART&lt;/td&gt;
&lt;td&gt;RGB LED&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Finally, add your Argon to the Grove FeatherWing and seat it snuggly. That’s it, all done with the physical build. Let’s get to the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add code and you’ll be monitoring ambient temperature in no time
&lt;/h2&gt;

&lt;p&gt;Even though assembling the hardware was rather trivial, your project won’t do much until you add code. Luckily, flashing your Argon isn’t overly complicated either. To make things even more streamlined, you can use existing firmware libraries for the Grove sensors and actuators, so you don’t have to start from scratch. Libraries are a great method to abstract away much of the code complexity. And by using the right libraries, you’ll basically only have to tie together the functions you want to use in your project, and add your own program logic.&lt;/p&gt;

&lt;p&gt;Additionally, by clicking on &lt;a href="https://go.particle.io/shared_apps/5ce72d269c35ef001786ffc4"&gt;this link&lt;/a&gt;, you’ll be taken to the Particle Web IDE with all of the code preloaded for you. All you’ll need to do is to duplicate the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Highlights from the code
&lt;/h2&gt;

&lt;p&gt;While it’s convenient to duplicate the code and call the project done, it’s worth looking at some of the sections of the program logic to understand what’s is being run on your Argon.&lt;/p&gt;

&lt;h4&gt;
  
  
  Pre-setup: library includes and variable definitions
&lt;/h4&gt;

&lt;p&gt;At the beginning of the code, you will see &lt;code&gt;#include&lt;/code&gt; and &lt;code&gt;#define&lt;/code&gt; declarations that specify the libraries used in the project and your pin configuration that is used for each sensor.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include "Seeed_DHT11.h"
#include "TM1637.h"
#include "Grove_ChainableLED.h"
#define DHTPIN A2     // Temp&amp;amp;Humi pin
#define CLK D2    // 4-Digit Display pins
#define DIO D3    
DHT dht(DHTPIN);    // Temp/&amp;amp;Humi object
TM1637 tm1637(CLK,DIO);    // 4-Digit Display object
ChainableLED leds(RX, TX, 1);     // LED object with respective pins
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Getting your code in order with the &lt;code&gt;Setup()&lt;/code&gt; function
&lt;/h4&gt;

&lt;p&gt;The setup function is used to initialise your libraries and configure their objects with settings that you’ll use later on in your code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void setup()
{
tm1637.init();    // initialize Display library
tm1637.set(BRIGHTEST);    // BRIGHT_TYPICAL = 2,BRIGHT_DARKEST = 0,BRIGHTEST = 7;
tm1637.point(POINT_ON);    // Enable 'decimal' points
leds.init();    // initialize LED library
dht.begin();    // initialize DHT library
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Understanding the main code &lt;code&gt;loop()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;In a sketch, the &lt;code&gt;loop()&lt;/code&gt; function is run continuously. So this is the section of the code where you want to put the main program logic of your project. At a high level, &lt;code&gt;loop()&lt;/code&gt; polls data from the sensors, processes the data, and outputs it in an actionable way. Let’s dive in.&lt;/p&gt;

&lt;h4&gt;
  
  
  Measuring the temperature and humidity
&lt;/h4&gt;

&lt;p&gt;The main data for this project comes from the temperature and humidity sensor attached to &lt;code&gt;A2&lt;/code&gt;. The first thing to do is to verify that the sensor data valid. Should there be any invalid data, the code will use the &lt;code&gt;Serial.println()&lt;/code&gt; to output, “Failed to read from DHT11 sensor!” and exit the the &lt;code&gt;loop()&lt;/code&gt; function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Read Humidity
float h = dht.getHumidity();

// Read temperature as Celsius
float t = dht.getTempCelcius();

// Read temperature as Farenheit
float f = dht.getTempFarenheit();

// Check if any reads failed
if (isnan(h) || isnan(t) || isnan(f))
{
Serial.println("Failed to read from DHT11 sensor!");
return;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Processing the temperature and humidity measurements
&lt;/h4&gt;

&lt;p&gt;If the data is valid, you’ll move on and separate the temperature data out in to individual numbers so they can be displayed on the 4-Digit display.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Separate the temperature to individual numbers to be used on the display.
int int_number = f * 100.0; // Two digits after decimal are kept. Turn the number into integer
int digits[10];             //Just in case I have 8 digits before decimal 
for (byte i=0; i&amp;lt;10; i++)
{
    digits[i]  = int_number % 10;
    if (int_number == 0) 
        break;
    int_number /= 10;
}

// display the numbers on the display
tm1637.display(0,digits[3]);
tm1637.display(1,digits[2]);
tm1637.display(2,digits[1]);
tm1637.display(3,digits[0]);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Outputting the temperature and humidity readings
&lt;/h4&gt;

&lt;p&gt;Up next, you’ll take the data you collected and push it out. Using both a serial connection as well as a &lt;code&gt;Particle.publish()&lt;/code&gt; makes sure you can read it locally and remotely, respectively.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Print the measured values over a Serial connection
Serial.print("Temp: ");
Serial.print(f);
Serial.println("*F ");
Serial.println();
Serial.println();

// Publis the temperature to the Cloud using Server Sent Events (SSE)
Particle.publish("tempF", String(f));
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Changing the RGB LED color based on the temperature
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eeqeyPFY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/Grove-temp-LED-red-crop-1024x576.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eeqeyPFY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/Grove-temp-LED-red-crop-1024x576.jpg" alt="When the temperature exceeds 75.0F, the RGB LED illuminates in red. This is handled in the logic of the loop() function."&gt;&lt;/a&gt;When the temperature exceeds 75.0F, the RGB LED illuminates in red. This is handled in the logic of the loop() function.&lt;/p&gt;

&lt;p&gt;The last bit of code is to control the color of the LED based on the current temperature. For this to work, the code uses conditional statements to evaluate if the current temperature is above or below 75F. If the temperature is above 75F, the RGB LED will turn red. If the temp is below that, the LED will illuminate blue. You can tweak the temperature thresholds simply by altering the &lt;code&gt;75.0&lt;/code&gt; in the code. Try it out for yourself. You’ll need to reflash your Argon to see your new code in action.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/ Temperature warning. Over 75F -&amp;gt; red. Under 75F -&amp;gt; Cyan.
if (f &amp;gt; 75.0){
leds.setColorRGB(0, 255, 0, 0); // red
}
if (f &amp;lt; 75.0){
leds.setColorRGB(0, 0, 0, 255); // cyan
}
delay(1000);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The last line of this snippet is not to be overlooked. The line &lt;code&gt;delay(1000)&lt;/code&gt; slows the execution of the &lt;code&gt;loop()&lt;/code&gt; function down by 1000ms. I added this so the code doesn’t exceed the &lt;code&gt;Particle.publish&lt;/code&gt; rate limit. Also, the sensor can’t read faster than 1000ms anyhow, so there’s no advantage in excluding the loop delay.&lt;/p&gt;

&lt;h4&gt;
  
  
  Know the temperature even when you’re not in the room with &lt;code&gt;Particle.publish()&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rbfa6ETN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/viewoftheconsole-1024x662.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rbfa6ETN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/viewoftheconsole-1024x662.png" alt="Image of the Particle Console showing the temperature data from the device."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Provided you’ve followed the instructions correctly, you should now have a working thermometer with a local display. Thanks to the &lt;code&gt;Particle.publish&lt;/code&gt; however, you can also see that temperature remotely by going to the &lt;a href="https://console.particle.io"&gt;Particle Console&lt;/a&gt; and selecting the device on the my devices tab or by checking the &lt;em&gt;Events&lt;/em&gt; tab (where you will be able to see publishes from all your devices at once).&lt;/p&gt;

&lt;h2&gt;
  
  
  Customizing this project to suite your needs
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7fvG0lEB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/Grove-temp-office-crop-1024x576.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7fvG0lEB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/06/Grove-temp-office-crop-1024x576.jpg" alt="Particle-powered conference room temperature monitor deployed in a conference room."&gt;&lt;/a&gt;Particle-powered conference room temperature monitor deployed in a conference room.&lt;/p&gt;

&lt;p&gt;Now you’ve got your project broadcasting data to the internet, you can take that data and act upon it. For inspiration, take a look at &lt;a href="https://particle.hackster.io/"&gt;Hackster&lt;/a&gt; for some inspirational projects and ideas for how you can extend this project. For example, you could use an &lt;a href="https://ifttt.com/particle"&gt;IFTTT recipe for Particle&lt;/a&gt; to automate an email to send when the room temperature exceeds your predefined max.&lt;/p&gt;

&lt;p&gt;Be sure that however you modify this project, you share your work in the &lt;a href="https://community.particle.io/"&gt;Particle forum&lt;/a&gt; and &lt;a href="https://twitter.com/particle"&gt;tweet your project photos&lt;/a&gt; at us.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://blog.particle.io/2019/06/14/gen3-wi-fi-thermometer/"&gt;Build this Wi-Fi thermometer for your workshop using a Gen 3 Argon and a Grove Starter Kit&lt;/a&gt; appeared first on &lt;a href="https://blog.particle.io"&gt;Particle Blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>iot</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Learn how-to build this cellular asset tracker with a Particle Boron</title>
      <dc:creator>Jordy Moors</dc:creator>
      <pubDate>Fri, 17 May 2019 18:00:32 +0000</pubDate>
      <link>https://dev.to/particle/learn-how-to-build-this-cellular-asset-tracker-with-a-particle-boron-519h</link>
      <guid>https://dev.to/particle/learn-how-to-build-this-cellular-asset-tracker-with-a-particle-boron-519h</guid>
      <description>&lt;p&gt;At some point in your life, you’ve probably been in a situation where you wished you could use a cellular asset tracker to help keep tabs on your stuff. Where you parked the car at a concert, the actual location of that package you ordered three weeks ago, or the whereabouts of that scooter you that’s been helping get you that last mile to work, knowing where the things you care about in life is a valuable thing.&lt;/p&gt;

&lt;p&gt;While there might be some generic solutions available, I’m going to show you how to build an all-purpose cellular asset tracker, with features that you can quikcly adapt to suit your specific needs. To build this tracker, the project uses FeatherWing accessory boards from the &lt;a href="https://www.adafruit.com/feather"&gt;Adafruit Feather system&lt;/a&gt; to allow you to easily customize the project by swapping out different sensors or actuators — no jumper-wires necessary.&lt;/p&gt;

&lt;p&gt;This project will be a relatively simple cellular asset tracking solution, but it’s a great base to customize to your needs. It starts with a &lt;a href="https://store.particle.io/products/boron-lte-kit"&gt;Particle Boron&lt;/a&gt; as the brains of the build. The Boron queries location data from an attached GPS module and displays the coordinates on a small OLED display. All three of the FeatherWing compatible devices attach together using a FeatherWing Tripler, and means zero wiring is required. And since there are hundreds of FeatherWings, you can easily expand the functionality just by swapping out a Wing and modifying your code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : If you’re unfamiliar with GPS and other geolocation technologies used in IoT, the &lt;a href="https://dev.to/particle/what-every-iot-engineer-needs-to-know-about-navigation-gps-dead-reckoning-cellular-wi-fi-and-ble-3k33"&gt;Ultimate Guide to Geolocation&lt;/a&gt; can help. Learn what every IoT engineer needs to know about GPS, dead reckoning, cellular, Wi-Fi, and BLE all in one place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project parts &amp;amp; tools
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C9GTirHt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/conclusion-169-crop-1024x576.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C9GTirHt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/conclusion-169-crop-1024x576.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Required parts:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://store.particle.io/products/boron-lte-kit"&gt;Particle Boron&lt;/a&gt; — this project assumes you’ve &lt;a href="https://docs.particle.io/boron/"&gt;set up your Boron&lt;/a&gt;. If you’ve not done that yet, follow the instructions here before you begin this project.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://store.particle.io/products/particle-featherwing-tripler"&gt;Particle FeatherWing Tripler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://store.particle.io/products/adafruit-oled"&gt;Adafruit FeatherWing OLED&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.adafruit.com/product/3133"&gt;Adafruit Ultimate GPS FeatherWing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Optional, but highly recommended parts&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.adafruit.com/product/380"&gt;CR1220 3V lithium coin cell battery&lt;/a&gt; — used with the GPS module to keep the real-time clock (RTC) powered and allow &lt;em&gt;warm starts&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.adafruit.com/product/851"&gt;SMA-to-uFL RF adapter cable&lt;/a&gt; — Most GPS antennas use an SMA connector, but most boards use smaller uFL connectors. This cable lets you connect them together.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.adafruit.com/product/960"&gt;GPS antenna&lt;/a&gt; — A bigger, more powerful antenna that will get you a better satellite fix more quickly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Soldering equipment is needed to connect some of the headers to the FeatherWings and Tripler board.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You’ll most likely also want an enclosure of some kind. In this project, we’ve used a custom laser cut enclosure, but you could 3D print something, or go with an off the shelf solution just as easily. You can &lt;a href="https://github.com/moors7/Boron-asset-tracker/blob/master/2dcase.svg"&gt;download my design files here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hardware assembly
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Step 1. Soldering the headers
&lt;/h2&gt;

&lt;p&gt;Some of the FeatherWings in this project will require you to solder the header pins to the boards. To keep the headers square to the board. Place them in a spare breadboard, with the board you want to add pins to on top. This will help you’ll get proper alignment as well as it’s a lot more convenient to solder with the parts firmly in place.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Cfls_GIr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/soldering-oled.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Cfls_GIr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/soldering-oled.jpg" alt=""&gt;&lt;/a&gt;You’ll need to solder the headers onto the Adafruit OLED FeatherWing.&lt;/p&gt;

&lt;p&gt;The FeatherWing Tripler uses female headers, but you can use a similar trick as you used with the breadboard. Place the female headers over their respective pins on one of the other FeatherWings, and then place them in the Tripler on top to solder. That way the headers will all line up correctly, and it’s a lot easier to solder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Attention:&lt;/strong&gt; make sure you solder the Tripler correctly, or you risk damaging your boards.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TrBIxkIL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/soldering-tripler.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TrBIxkIL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/soldering-tripler.jpg" alt=""&gt;&lt;/a&gt;Soldering the Tripler can be done without helping hands, but a steady hand is requited.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2. Assembling your FeatherWings
&lt;/h2&gt;

&lt;p&gt;With the soldering out of the way, you can move on to assembling the project. FeatherWing placement matters. In order to ensure access to the battery port on the Boron, you must place it on the right-hand side of the Tripler. In the middle comes the OLED Feather, and the GPS Wing will be on the left side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you don’t use this ordering, you’ll have trouble routing the antenna and battery cables.&lt;/p&gt;

&lt;p&gt;At this point, you can carefully attach the antennas to their respective connectors — make sure you use the cellular connector on the top side — and plug in the battery to the Boron.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3. Laser-cut your enclosure or build your own
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wkmirxrH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/enclosure-crop-1024x768.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wkmirxrH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/enclosure-crop-1024x768.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’ve made or purchased an enclosure, you can start fitting the project in there now.&lt;/p&gt;

&lt;h2&gt;
  
  
  Navigating the Boron asset tracker source code
&lt;/h2&gt;

&lt;p&gt;The code for this project is kept relatively simple, so it can easily be customized to suit your individual needs. The code makes use of the TinyGPS++ library to abstract the hard parts of dealing with GPS data and gives you easy to use functions to extract the data you need. That way, you don’t have to reinvent the wheel and go through the hassle of dealing with raw GPS data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RM0nKfa_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/Tracker-hero.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RM0nKfa_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/Tracker-hero.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In a bird’s eye view, the code loops to see if there is GPS data available and hands it to the tinyGPS library for parsing if so. It then checks whether the data coming out is sensible. When that’s not the case, it will give an error output on the display, informing you a fix hasn’t been found. If the data does make sense, it will package it in a nice format and will display the GPS coordinates on the display. That’s also where you could make changes to the information that gets displayed.&lt;/p&gt;

&lt;p&gt;Finally, the code will publish a message to the cloud with the GPS information, which can be acted upon on that end using &lt;a href="https://docs.particle.io/tutorials/device-cloud/webhooks/"&gt;webhooks&lt;/a&gt;, or other &lt;a href="https://docs.particle.io/tutorials/device-cloud/console/#integrations"&gt;integrations&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://go.particle.io/shared_apps/5cd9a8733035ef0023871896%0A"&gt;Click here to load the code in your WebIDE&lt;/a&gt; — no extra typing required.&lt;/p&gt;

&lt;p&gt;If you’re not using the Web IDE share link, make sure to manually include the TinyGPS++ and the oled-wing-adafruit libraries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code highlights and commentary
&lt;/h2&gt;

&lt;p&gt;The code for this project is all open source, but I wanted to quickly highlight a few of the most important sections to help give you ideas for where you can modify to suit your needs. Take special note of the line numbers as I’m covering snippets of code below.&lt;/p&gt;

&lt;p&gt;The following code will run in a continuous loop, checking to see if new GPS information is available. If there is new data, it will call the &lt;code&gt;displayInfo()&lt;/code&gt; function to start processing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void loop()
{
    display.loop();
    while (Serial1.available() &amp;gt; 0) {
        if (gps.encode(Serial1.read())) {
            displayInfo();
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The code shown below is taken from the &lt;code&gt;displayInfo()&lt;/code&gt; function.&lt;/p&gt;

&lt;p&gt;After getting the GPS data and making sure it’s valid, the information is packed into a buffer and displayed on the OLED.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;display.clearDisplay();
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0,0);
snprintf(buf, sizeof(buf), "%f", gps.location.lat());
display.println(buf);
snprintf(buf, sizeof(buf), "%f", gps.location.lng());
display.println(buf);
display.display();
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Up next, the code packages the data in new buffers so it has a nice format for output over Serial.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;snprintf(buf, sizeof(buf), "%f,%f,%f", gps.location.lat(), gps.location.lng(), gps.altitude.meters()); // Format for Serial logging
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Finally, there’s a check to see if we’re not publishing too often. If that’s not the case, then publish the data to the cloud.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (Particle.connected()) {
    if (millis() - lastPublish &amp;gt;= PUBLISH_PERIOD) {
        lastPublish = millis();
        Particle.publish("gps", pubbuf, PRIVATE);
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Visualizing your data with Ubidots
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---_ZBAwgO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/ubidots-map.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---_ZBAwgO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/ubidots-map.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To take this project a step further than displaying the coordinates on the OLED, you can send the data to an online platform to display it on a map. There are various services available that offer functionality like this, such as the &lt;a href="https://docs.particle.io/tutorials/integrations/google-maps/"&gt;Particle Google Maps integration&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For this tutorial, I chose to use &lt;a href="https://ubidots.com/"&gt;Ubidots&lt;/a&gt;. They offer a great service for ingesting data and plotting it on a map. Plus it’s easy to integrate. You can get the data to them by using a webhook in the Console, and a specific &lt;code&gt;Particle.publish()&lt;/code&gt; on the device.&lt;/p&gt;

&lt;p&gt;First, create an account on Ubidots. For Ubidots to accept the data as a GPS location, it will look for a specific format in the data it receives. It expects to find a JSON object containing a &lt;code&gt;lat&lt;/code&gt; and &lt;code&gt;lng&lt;/code&gt; key, with their respective values.&lt;/p&gt;

&lt;h4&gt;
  
  
  On the device:
&lt;/h4&gt;

&lt;p&gt;To get the data in the format Ubidots expects it, you’ll have to add some bits to the code. The key lines to look at here are line &lt;code&gt;71&lt;/code&gt; and &lt;code&gt;86&lt;/code&gt;, which create and fill a buffer for Ubidots.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;char pubbuf[120];
if (gps.location.isValid() &amp;amp;&amp;amp; gps.location.age() &amp;lt; MAX_GPS_AGE_MS) {
    display.clearDisplay();
    display.setTextSize(2);
    display.setTextColor(WHITE);
    display.setCursor(0,0);
    snprintf(buf, sizeof(buf), "%f", gps.location.lat());
    display.println(buf);
    snprintf(buf, sizeof(buf), "%f", gps.location.lng());
    display.println(buf);
    display.display();
    snprintf(buf, sizeof(buf), "%f,%f,%f", gps.location.lat(), gps.location.lng(), gps.altitude.meters());
    snprintf(pubbuf, sizeof(pubbuf), "{\"position\": {\"value\":1, \"context\":{\"lat\": \"%f\", \"lng\": \"%f\"}}}", gps.location.lat(), gps.location.lng());
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Create a new buffer to store the Ubidots formatted data in. Then, fill that buffer with the JSON content and the GPS data. Finally, Publish that buffer as a &lt;code&gt;Particle.publish()&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  In the console:
&lt;/h4&gt;

&lt;p&gt;To get the published data to Ubidots, you can use their API. To do so, you’ll have to create a &lt;a href="https://docs.particle.io/tutorials/device-cloud/webhooks/"&gt;webhook&lt;/a&gt;. Go to the &lt;a href="https://console.particle.io/integrations"&gt;Console&lt;/a&gt;, and find the integrations tab on the left. Create a new integration and select a webhook. In the top left, find and select the custom template option. Copy and paste in the following snippet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "event": "gps",
    "url": "https://industrial.api.ubidots.com/api/v1.6/devices/{{{PARTICLE_DEVICE_ID}}}",
    "requestType": "POST",
    "noDefaults": false,
    "rejectUnauthorized": true,
    "headers": {
        "X-Auth-Token": "replace-this-with-your-token",
        "Content-Type": "application/json"
    },
    "body": "{{{PARTICLE_EVENT_VALUE}}}"
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Make sure to replace the highlighted &lt;code&gt;X-Auth-Token&lt;/code&gt; with your own. You can find said token by going to your Ubidots account, clicking on your profile icon and selecting API credentials.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XoMgoYTS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/ubidots-config-crop.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XoMgoYTS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/ubidots-config-crop.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you've successfully completed each of the steps, you should now have a functioning cellular asset tracker that will display its GPS coordinates on the screen, as well as publish them to the cloud, where you can work with them in different ways to serve your purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where will you take you take your asset tracker?
&lt;/h2&gt;

&lt;p&gt;Starting with this project, you can use it as the basis of a car tracking system, a geofence for your pets or kids, track shipping containers or do something as mundane as making internet connected scooters. The possibilities are certainly there and so are the basics to start from.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GWgNhD9e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/tracker-front-on-169-crop-1024x576.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GWgNhD9e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://blog.particle.io/wp-content/uploads/2019/05/tracker-front-on-169-crop-1024x576.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a look over at &lt;a href="https://www.hackster.io/particle"&gt;Hackster&lt;/a&gt; to get inspiration for projects you could build next. Additionally, share your thoughts and ideas on our &lt;a href="https://community.particle.io/"&gt;Particle forum&lt;/a&gt;, where you can brainstorm and get project advice. It’s also a great place to ask questions, with many of our members being eager to help out.&lt;/p&gt;

&lt;p&gt;Now go forth and track something that matters to you.&lt;/p&gt;

&lt;p&gt;The post &lt;a href="https://blog.particle.io/2019/05/17/learn-how-to-build-this-cellular-asset-tracker-with-a-particle-boron/"&gt;Learn how-to build this cellular asset tracker with a Particle Boron&lt;/a&gt; appeared first on &lt;a href="https://blog.particle.io"&gt;Particle Blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>iot</category>
    </item>
  </channel>
</rss>
