<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tom Horton on Medium]]></title>
        <description><![CDATA[Stories by Tom Horton on Medium]]></description>
        <link>https://medium.com/@thomasphorton?source=rss-315caaaf1355------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*GeoIm9bNB0agGLoE.jpg</url>
            <title>Stories by Tom Horton on Medium</title>
            <link>https://medium.com/@thomasphorton?source=rss-315caaaf1355------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 12:30:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thomasphorton/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I recently attended the GeekWire Cloud Summit in Seattle, and listened to a great fireside chat…]]></title>
            <link>https://medium.com/@thomasphorton/i-recently-attended-the-geekwire-cloud-summit-in-seattle-and-listened-to-a-great-fireside-chat-9fe738a56b6e?source=rss-315caaaf1355------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fe738a56b6e</guid>
            <category><![CDATA[gardening]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[makers]]></category>
            <dc:creator><![CDATA[Tom Horton]]></dc:creator>
            <pubDate>Mon, 17 Jun 2019 15:33:09 GMT</pubDate>
            <atom:updated>2019-06-19T17:39:54.135Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Soil Humidity Monitor on Arduino</h3><p>I recently attended the GeekWire Cloud Summit in Seattle, and listened to a great fireside chat with Kevin Scott, the CTO of Microsoft. Although he covered a wide range of subjects, he touched on how some Azure customers are using IoT to add value to the agriculture industry. That was all it took for me to start shopping around for some parts to see if I could spin up a proof of concept.</p><p>This project isn’t finished yet, but I have reached the first milestone- <strong>get soil humidity of plants</strong>. I’ll follow up with another post as I build out the notification system.</p><h3>The Problem</h3><p>I’m not the green thumb of the house- that’s Lindsey’s specialty. I do, however, enjoy having lots of greenery around my desk. I often neglect my plants (poor babies) and although I haven’t killed any yet, they get pretty sad when they’re not watered.</p><h3>The Solution</h3><p>I’d like to be notified when the plants are drying out. I can use a simple sensor (hygrometer) to detect soil humidity, and use that data to establish some thresholds around alerting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*vp9g4Nn6SSPayhXz.jpeg" /></figure><h3>The Materials</h3><h3>Hardware</h3><ul><li><a href="https://amzn.to/2MH0kVT">5x Soil Hygrometer</a></li><li><a href="https://amzn.to/2MJsb8c">Arduino Uno</a></li></ul><h3>Software</h3><ul><li><a href="https://www.arduino.cc/en/Main/Software">Arduino IDE</a></li></ul><h3>Procedure</h3><p>I’ve had an Arduino sitting unused in my parts kit for the better part of a decade, so I was happy to finally have a use for it.</p><ol><li>Connect the Arduino to your computer via USB.</li><li>Connect a hygrometer to the Arduino. The diagram below skips ahead to showing multiple, but it’s best to focus on one and get it working before adding more. Make sure you grab 3.3V- powering with 5V will likely damage your sensors.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AhUS9svkkFuZ8GfI.png" /></figure><p>3. Write a script to read from the hygrometer and upload it to the Arduino through the Arduino IDE. Here’s some super rough code:</p><pre>#define M0 A0 // The definition of AO pin IO-A0</pre><pre>// The analog values passed to the sensor are between 0 and 1023.<br>int wetValue = 0;<br>int dryValue = 1023;</pre><pre>// We’d like the values to be between 0 and 100, for % humidity.<br>int friendlyWetValue = 100;<br>int friendlyDryValue = 0;</pre><pre>void setup() { <br>  // Initialize our pin.<br>  pinMode(A0, INPUT);</pre><pre>  // Open up serial coms.<br>   Serial.begin(9600); <br>} </pre><pre>void loop() { </pre><pre>  Serial.println(“Soil Humidity Measurements:”);</pre><pre>  // Read the value from the pin.<br>  int rawValue = analogRead(A0);</pre><pre>  Serial.print(“Raw: “);<br>  Serial.print(rawValue);</pre><pre>  Serial.print(“ | “);</pre><pre>  // Use the map function to normalize the voltage values between 0 and 100.<br>  int friendlyValue = map(rawValue, dryValue, wetValue, friendlyDryValue, friendlyWetValue);</pre><pre>  Serial.print(“Friendly: “);<br>  Serial.print(friendlyValue);</pre><pre>  // Wait 60 seconds before taking the next measurement.<br> delay(60 * 1000); <br>}</pre><p>4. Observe hygrometer outputs in the serial console. This plant is thirsty!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/0*UpODqsXlslZiyg5-.gif" /></figure><p>5. Connect multiple hygrometers and update the script to handle them. I got lazy and copy/pasted the original code a few more times, this can get refactored later but it’s not important to me right now. Check out the <a href="https://github.com/thomasphorton/greenthumb/blob/master/soil-humidity.ino">updated Arduino Sketch for Soil Humidity on GitHub</a>.</p><h3>So Now What?</h3><p>The Arduino can now read the soil humidity, but we can only observe the values through the IDE’s serial monitor. This isn’t the standalone solution that I’m looking for- I’d like to power this through a 5v USB cable and communicate over WiFi. Once that’s done, I can start to work on sending the data to the cloud, where there’s plenty of cool stuff we can do with it such as sending alerts and charting out historical data.</p><h3>Future Work</h3><h3>Get Arduino on WiFi</h3><p>It looks like there are new Arduino revisions coming out soon that have WiFi built in, but my old Arduino Leonardo doesn’t have that capability. I’ve been reading about the ESP8266 chip and that seems like the route to go. You can buy Arduino WiFi shields that are ‘plug and play’ for ~$35 but the $2.50 ESP8266 is a good opportunity to learn some new stuff and save a few bucks.</p><h3>Send Data to AWS IoT from Arduino</h3><p>I’ve done plenty of AWS IoT work using the NodeJS SDK so hopefully some of that transfers. The Arduino runs C though, and I’ll have to figure out how to add libraries to the Arduino package. I’ll also have to figure out how to load x.509 certs onto the Arduino. Once that’s sorted out, I can send data to AWS IoT and use the rules engine to connect my data stream however I’d like.</p><h3>Act on IoT Data</h3><p>I’ve got a couple of things to figure out here. In the past I’ve just sent data to CloudWatch and configured alarms based off of that, but I’d like to explore some of the other features that AWS IoT offers. More research and fiddling is needed here.</p><h3>Store Data</h3><p>I’m not concerned about storing data except to look at trends later on- if I went the CloudWatch route I’d get all of this out of the box. I might be convincing myself just to do CloudWatch :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fe738a56b6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sending Data to AWS IoT via Cell]]></title>
            <link>https://medium.com/@thomasphorton/sending-data-to-aws-iot-via-cell-3a6000530b57?source=rss-315caaaf1355------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a6000530b57</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[sailing]]></category>
            <dc:creator><![CDATA[Tom Horton]]></dc:creator>
            <pubDate>Wed, 05 Jun 2019 21:26:01 GMT</pubDate>
            <atom:updated>2019-06-05T21:26:01.033Z</atom:updated>
            <content:encoded><![CDATA[<p>In my <a href="http://thomasphorton.com/building-a-smart-boat-intro">previous post</a>, I outlined my basic setup to use a GPS module hooked up to the Raspberry Pi to send data to the AWS IoT service. That’s great when I’m at home with a hardwired connection (or wifi!), but I need to find a way to keep everything transportable and wireless.</p><p>My requirements:</p><ul><li>Wireless</li><li>Low power consumption</li><li>Inexpensive data transfer cost</li></ul><p>After an admittedly short time searching, I found a really cool solution in <a href="https://hologram.io/">Hologram</a>. They offer a USB cell phone modem, specifically built for IoT projects like this. I ended up ordering the <a href="https://hologram.io/store/nova-global-3g-2g-cellular-modem">Nova Global 3G/2G Cellular Modem</a> for $49. I also ordered an extra SIM card, which ended up being unnecessary- the Nova comes with one!</p><p>Developer pricing for Hologram seems pretty reasonable. The first 1MB/mo is free, and then you pay $0.60/MB after that. You can set Data Limits by the byte as well, which is great for preventing overages while experimenting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /><figcaption>Hologram Nova Unboxing</figcaption></figure><h3>Using the Hologram Nova</h3><p>The Nova couldn’t be simpler to use. It comes with a plastic casing that you can snap around the board, and two different basic antennas that can snap on. The board takes U.fl/IPEX connectors, so you can rig up a better antenna, which I’ll do once I start testing on the boat itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/0*frZhsOcnaQqWRQ0Y.gif" /><figcaption>Hologram Nova Assembled</figcaption></figure><p>From there, the setup is straightforward. You need to SSH into your Pi and download a few libraries (the instructions are included in the kit). Once you do that, you can use the included Hologram library to send messages to Hologram’s IoT service, which seems pretty robust. I had already done a lot of work on AWS though, so I needed to open up the modem to general internet traffic.</p><p>Fortunately, that’s simple as well. The Hologram SDK comes with a command:</p><pre>hologram connect</pre><p>After running the hologram connect command, the blue status light on the Nano will turn on. This indicates that you’ve started a session and have access to the internet!</p><h3>WARNING</h3><p>At this point, you’re being billed by the megabyte for everything that gets sent to your Pi. Be careful to disconnect the modem with hologram disconnect before downloading any further project dependencies!</p><p>For reference, jQuery 3.3.1 alone is 84kb- you can quickly rack up a bill if you surf the internet with Hologram still connected!</p><h3>Best Pi Antenna Solution</h3><p>It’s not necessary for testing, but I wanted to make sure I beefed up the antenna on the modem and on the GPS receiver. Both have U.fl/IPEX connectors, so I bought a pack of <a href="http://amzn.to/2GfWDza">pigtail adapters</a> and a couple of these <a href="http://amzn.to/2DGYHSy">GPS antennas</a>.</p><p>The antennas are waterproof (supposedly), so I’m planning on running them from the cabin out through a hole near the lazarette. I’ll probably use Velcro to attach them, since I’ve got a fiberglass hull.</p><h3>Next Steps</h3><p>The fun part is next! We’re going to do a trial run with the full wireless system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a6000530b57" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>