<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>weather station &#8211; Squix &#8211; TechBlog</title>
	<atom:link href="https://blog.squix.org/tag/weather-station/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.squix.org</link>
	<description></description>
	<lastBuildDate>Thu, 09 Dec 2021 08:10:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.8</generator>
<site xmlns="com-wordpress:feed-additions:1">121913304</site>	<item>
		<title>ESP8266 Weather Station: Getting Started Guide available for Kindle</title>
		<link>https://blog.squix.org/2016/09/esp8266-weather-station-getting-started-guide-available-for-kindle.html</link>
					<comments>https://blog.squix.org/2016/09/esp8266-weather-station-getting-started-guide-available-for-kindle.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Sat, 03 Sep 2016 12:17:25 +0000</pubDate>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[weather station]]></category>
		<guid isPermaLink="false">http://blog.squix.org/?p=779</guid>

					<description><![CDATA[Once in a while I like to try out new ways to reach the audience. I&#8217;m happy to present the ESP8266 Weather Station: Getting Started Guide is now available for Kindle. If you are a frequent reader of this blog you might recognise some content ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2016/09/esp8266-weather-station-getting-started-guide-available-for-kindle.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<p>Once in a while I like to try out new ways to reach the audience. I&#8217;m happy to present the ESP8266 Weather Station: Getting Started Guide is now available for Kindle. If you are a frequent reader of this blog you might recognise some content of the guide from older posts. But I hope you still enjoy reading it on another device and in a revised form with additional information for beginners.</p>
<p><span id="more-779"></span></p>
<p><img data-recalc-dims="1" fetchpriority="high" decoding="async" data-attachment-id="780" data-permalink="https://blog.squix.org/2016/09/esp8266-weather-station-getting-started-guide-available-for-kindle.html/coversmall" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/09/CoverSmall.jpg?fit=600%2C800&amp;ssl=1" data-orig-size="600,800" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="CoverSmall" data-image-description="" data-image-caption="&lt;p&gt;This Guide is also available as eBook on Amazon&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/09/CoverSmall.jpg?fit=225%2C300&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/09/CoverSmall.jpg?fit=600%2C800&amp;ssl=1" class="aligncenter wp-image-780 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/09/CoverSmall.jpg?resize=225%2C300&#038;ssl=1" alt="CoverSmall" width="225" height="300" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/09/CoverSmall.jpg?resize=225%2C300&amp;ssl=1 225w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/09/CoverSmall.jpg?resize=300%2C400&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/09/CoverSmall.jpg?w=600&amp;ssl=1 600w" sizes="(max-width: 225px) 100vw, 225px" /></p>
<p>At the end of each chapter I quickly summarize what we accomplished and info boxes shed some additional light on aspects which might be new for beginners. The ebook is available on all Amazon Kindle stores (US, DE, etc.) just search for &#8220;ESP8266 Weather Station&#8221; or follow this link:<br />
<a href="https://www.amazon.com/ESP8266-Weather-Station-Getting-Started-ebook/dp/B01LFX8Z5W/" target="_blank">https://www.amazon.com/ESP8266-Weather-Station-Getting-Started-ebook/dp/B01LFX8Z5W/</a></p>
<p>Let me know what you think of it!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2016/09/esp8266-weather-station-getting-started-guide-available-for-kindle.html/feed</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">779</post-id>	</item>
		<item>
		<title>ESP8266: Turn a $9 Body Scale into a Smart Scale &#8211; Part 1</title>
		<link>https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html</link>
					<comments>https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Fri, 22 Jul 2016 14:32:45 +0000</pubDate>
				<category><![CDATA[ESP8266-projects]]></category>
		<category><![CDATA[Body Scale]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[hx711]]></category>
		<category><![CDATA[Load Cells]]></category>
		<category><![CDATA[Smart Scale]]></category>
		<category><![CDATA[weather station]]></category>
		<guid isPermaLink="false">http://blog.squix.org/?p=615</guid>

					<description><![CDATA[In this project I will show you how you can build yourself a fancy Withings-like body scale. I divided the article into two parts: Part 1 describes the hardware hack and Part 2 the software. In this project I used a cheap scale I bought in the ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<p>In this project I will show you how you can build yourself a fancy Withings-like body scale. I divided the article into two parts: Part 1 describes the hardware hack and Part 2 the software. In this project I used a cheap scale I bought in the local super market for 9 Swiss Francs (which is currently about USD $9.-) and I am optimistic that other digital scales will work for you as well. This project was a lot of fun since I had to do reverse-engineering, soldering, programming and (optionally) even 3D modelling and printing. I hope you will enjoy it as much as did!<span id="more-615"></span></p>
<figure id="attachment_626" aria-describedby="caption-attachment-626" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?ssl=1"><img data-recalc-dims="1" decoding="async" data-attachment-id="626" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-46" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?fit=2308%2C1582&amp;ssl=1" data-orig-size="2308,1582" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469026404&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.04&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Splash Screen of the SmartScale" data-image-description="" data-image-caption="&lt;p&gt;Splash Screen of the SmartScale&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?fit=300%2C206&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?fit=730%2C500&amp;ssl=1" class="size-medium wp-image-626" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?resize=300%2C206&#038;ssl=1" alt="Splash Screen of the SmartScale" width="300" height="206" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?resize=300%2C206&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?resize=768%2C526&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?resize=1024%2C702&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-17.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-626" class="wp-caption-text">Splash Screen of the revamped SmartScale</figcaption></figure>
<h1>Before we begin</h1>
<p>Just a little word of warning: you might  be taking apart a working digital body scale. I cannot guarantee that your retrofitting will actually work and you might end up having just a broken body scale. Because of this I recommend that you are using a cheap or old digital scale rather than an expensive working one&#8230;<br />
The other thing I&#8217;d like to mention: it took me many hours of my scarce free time to build and document this project. While I am not depending on income from this blog I still very much appreciate teleported beer (<a href="https://www.paypal.me/squix/5USD">donation</a>), you following one of my <a href="http://www.banggood.com/?p=6R31122484684201508S">affiliate links</a> or buying something from <a href="https://blog.squix.org/shop">my shop</a>. Thank you!<br />
This is a write up of a project I started about a year ago. The project went back onto my &#8220;work-in-progress stack&#8221; and was waiting for a revival. Back then I also wrote a <a href="https://blog.squix.org/2015/08/esp8266-diy-wifi-body-scale-for-less.html">quick article about it</a>.</p>
<h1>What you will need</h1>
<p>The components I used in my project set me back between USD $30-40 including the body scale. The following list should give you an idea what components you&#8217;ll need and what you should be looking for.</p>

<table id="tablepress-3" class="tablepress tablepress-id-3">
<thead>
<tr class="row-1">
	<th class="column-1">Image</th><th class="column-2">Description</th><th class="column-3">Where to buy</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/CoopScale.jpg"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/CoopScale-150x150.jpg?resize=90%2C90" alt="Original Digital Body Scale" width="90" height="90" class="size-thumbnail wp-image-669" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/CoopScale.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/CoopScale.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/CoopScale.jpg?zoom=3&amp;resize=90%2C90&amp;ssl=1 270w" sizes="(max-width: 90px) 100vw, 90px" /></a> </td><td class="column-2"><B>Digital Body Scale</B>: It is very practical if you can build your smart scale project on an existing digital scale. From what I can tell modern digital scales all use the same kind of sensor (load cell) but I cannot guarantee it</td><td class="column-3">Switzerland: <a href="https://www.bauundhobby.ch/bad-%2B-sanit%C3%A4r/personenwaagen/digitale-personenwaagen/prix-garantie-personenwaage-pink/C050402/P4074988/de">Coop</a>. <BR/>IKEA also has a low-cost scale: <a href="http://www.ikea.com/ch/de/catalog/products/50285538/">IKEA </a></td>
</tr>
<tr class="row-3">
	<td class="column-1"><a href="/go/wemosd1mini" target="_blank"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/WemosD1Mini-150x150.jpg?resize=90%2C90" alt="Wemos D1 Mini" width="90" height="90" class="size-thumbnail wp-image-670" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/WemosD1Mini.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/WemosD1Mini.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/WemosD1Mini.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/WemosD1Mini.jpg?w=600&amp;ssl=1 600w" sizes="(max-width: 90px) 100vw, 90px" /></a></td><td class="column-2">The ESP8266 module is the next important component. It is the brain and mouth of your smart scale. I recommend a small development module like the Wemos D1 Mini: it has enough pins and is small</td><td class="column-3"><a href="/go/wemosd1mini" target="_blank">Banggood</a></td>
</tr>
<tr class="row-4">
	<td class="column-1"><a href="/go/hx711" target="_blank"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/HX711-150x150.jpg?resize=90%2C90" alt="HX711 Amplifier Module" width="90" height="90" class="wp-image-671" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/HX711.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/HX711.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/HX711.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/HX711.jpg?w=600&amp;ssl=1 600w" sizes="(max-width: 90px) 100vw, 90px" /></a> </td><td class="column-2">The HX711 module is a so called Load Cell Amplifier and will convert the weak analog signal from the weight sensor into bits and bytes the ESP8266 can understand.</td><td class="column-3"><a href="/go/hx711" target="_blank">Banggood</a></td>
</tr>
<tr class="row-5">
	<td class="column-1"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LifePo4Batteries.jpg"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LifePo4Batteries-150x150.jpg?resize=90%2C90" alt="LifePo4Batteries" width="90" height="90" class="size-thumbnail wp-image-637" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LifePo4Batteries.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LifePo4Batteries.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LifePo4Batteries.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LifePo4Batteries.jpg?w=600&amp;ssl=1 600w" sizes="(max-width: 90px) 100vw, 90px" /></a></td><td class="column-2">Power Source - I picked a Lifepo4 AA-type battery since it provides the perfect voltage and has a considerable amount of capacity. The AA packaging (14500) also helps to buy or 3d print a good holder. If you don't own a 3d printer also buy a AA-cell holder</td><td class="column-3"><a href="http://www.aliexpress.com/item/4PCS-Soshine-700mAh-14500-AA-battery-LiFePO4-Rechargeable-3-2V-Battery-pilas-recargables-Protected-batteria-Free/32267000236.html" target="_blank">AliExpress</a></td>
</tr>
<tr class="row-6">
	<td class="column-1"><a href="/go/oled-1-3-white" target="_blank"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SSD1306Oled-150x150.jpg?resize=90%2C90" alt="SSD1306 0.96&quot; OLED display" width="90" height="90" class="size-thumbnail wp-image-638" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SSD1306Oled.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SSD1306Oled.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SSD1306Oled.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SSD1306Oled.jpg?w=600&amp;ssl=1 600w" sizes="(max-width: 90px) 100vw, 90px" /></a> </td><td class="column-2">These OLED displays are just wonderful: since the pixels glow by themselves the contrast is very high. You can choose between the 0.96 inch SSD1306 display or the 1.3 inch SH1106 one. The smaller one you can buy in the Squix Shop, the other you'll have to order from AliExpress or similar</td><td class="column-3">0.96" Oled Display:<br />
<a href="/go/oled-1-3-white" target="_blank">Banggood</a><br />
1.3" Oled Display:<br />
<a href="/go/oled096white" target="_blank">Banggood</a></td>
</tr>
</tbody>
</table>

<p>Besides these &#8220;core&#8221; components you will also require wires, solder and solder iron, screw drivers.</p>
<h1>Understanding the Body Scale</h1>
<p>So here is the plan: you open up your pretty body scale, remove everything you don&#8217;t need and keep the load cells (the components which measure the weight) in place. Then you connect the load cells to your HX711 amplifier module and connect the amplifier to your ESP8266. Then you&#8217;ll need to attach the OLED display to the ESP8266 as well and bring in some kind of power source with an on-off switch. Easy, isn&#8217;t it?</p>
<figure id="attachment_622" aria-describedby="caption-attachment-622" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="622" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-42" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469011447&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;80&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?fit=730%2C548&amp;ssl=1" class="wp-image-622 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?resize=300%2C225&#038;ssl=1" alt="image" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-622" class="wp-caption-text">The mini PCB I re-used. Now I just had to connect the four wires to the HX711 (click to zoom)</figcaption></figure>
<p>For me the hardest part was to figure out how the load cells should be connected to the HX711. Luckily the load cells were attached to a mini PCB which in turn was soldered with only a few pins to the main board of the body scale. So I only had to figure out how to connect the four pins of the mini PCB to the HX711 module rather than figuring out how to connect the 12 wires of the load cells (3 wires and 4 load cells). I don&#8217;t know how your scale will look like. Maybe you will be lucky as well but it also could be that you have to do some hard core reverse engineering. Maybe the following pictures will help.</p>
<figure id="attachment_644" aria-describedby="caption-attachment-644" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LoadCellWiring.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="644" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/loadcellwiring" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LoadCellWiring.jpg?fit=750%2C398&amp;ssl=1" data-orig-size="750,398" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="LoadCellWiring" data-image-description="" data-image-caption="&lt;p&gt;Load Cell Wiring (click to zoom)&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LoadCellWiring.jpg?fit=300%2C159&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LoadCellWiring.jpg?fit=730%2C387&amp;ssl=1" class="size-medium wp-image-644" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LoadCellWiring.jpg?resize=300%2C159&#038;ssl=1" alt="Load Cell Wiring (click to zoom)" width="300" height="159" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LoadCellWiring.jpg?resize=300%2C159&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/LoadCellWiring.jpg?w=750&amp;ssl=1 750w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-644" class="wp-caption-text">Load Cell Wiring (click to zoom)</figcaption></figure>
<p>I suggest that you test the setup on a bread board before you take out the soldering iron. This way you can easily switch the wires until everything works. SparkFun has a very good introduction to load cells and the HX711: <a href="https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide">Sparkfun Load Cell Tutorial</a></p>
<p>&nbsp;</p>
<h1>Connecting the load cells and the HX711 Amp</h1>
<p>Now that we (hopefully) have figured out how to use the existing load cells we have to connect them to the amplifier and the amplifier to the ESP8266.</p>
<figure id="attachment_622" aria-describedby="caption-attachment-622" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="622" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-42" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469011447&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;80&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?fit=730%2C548&amp;ssl=1" class="wp-image-622 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?resize=300%2C225&#038;ssl=1" alt="image" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-13.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-622" class="wp-caption-text">The mini PCB that came with the digital scale connected to the HX711</figcaption></figure>
<figure id="attachment_618" aria-describedby="caption-attachment-618" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="618" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-38" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469011394&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?fit=730%2C548&amp;ssl=1" class="wp-image-618 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?resize=300%2C225&#038;ssl=1" alt="image" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-9.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-618" class="wp-caption-text">A look to the other side of the boards: mini PCB connected to the HX711. I drew the labels V+, V-, S+ and S- on the mini PCB. Sometimes you see this naming scheme</figcaption></figure>
<p>Again, how you connect the load cells to the HX711 requires a bit of educated guessing. Read through the previous chapter, read the SparkFun tutorial about load cells, use the color codes of the wires. Then connect the HX711 to the ESP8266. The following image is just a zoomed in version of the complete wiring below:</p>
<figure id="attachment_647" aria-describedby="caption-attachment-647" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SketchHX711.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="647" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/sketchhx711" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SketchHX711.png?fit=1055%2C779&amp;ssl=1" data-orig-size="1055,779" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="SketchHX711" data-image-description="" data-image-caption="&lt;p&gt;Zoomed in sketch of the HX711 wiring. See full picture below (Click to zoom)&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SketchHX711.png?fit=300%2C222&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SketchHX711.png?fit=730%2C539&amp;ssl=1" class="size-medium wp-image-647" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SketchHX711.png?resize=300%2C222&#038;ssl=1" alt="Zoomed in sketch of the HX711 wiring. See full picture below (Click to zoom)" width="300" height="222" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SketchHX711.png?resize=300%2C222&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SketchHX711.png?resize=768%2C567&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SketchHX711.png?resize=1024%2C756&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/SketchHX711.png?w=1055&amp;ssl=1 1055w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-647" class="wp-caption-text">HX711 wiring. See full sketch below (Click to zoom)</figcaption></figure>
<h1>Connecting the OLED display</h1>
<p>If you are familiar with my <a href="https://blog.squix.org/2015/12/esp8266-weather-station-measuring-2.html">WeatherStation project</a> or the <a href="https://blog.squix.org/2016/07/esp8266-based-plane-spotter-how-to.html">ESP8266 based plane spotter</a> then the wiring of the OLED display should be straight forward. Just connect VCC on the display with 3V3 on the ESP8266, GND with GND, SDA on the display with D6 on the ESP and SCL with D7. In theory you can choose any D-pin for SDA and SCL, just make sure that they don&#8217;t have special functions. I think D8 is required for programming, others might be used for flash access. Also when you use the pins I suggest here you won&#8217;t have to change anything with my code. Please have a look at the complete sketch below for a graphical representation of the setup.</p>
<h1>Connecting the power source</h1>
<p>Now to my new favourite power source in the ESP8266 world: the LiFePo4 AA battery. After watching the <a href="https://www.youtube.com/watch?v=heD1zw3bMhw">excellent video</a> of my fellow (Swiss) country man Andreas Spiess about ESP8266 battery sources I immediately ordered a few from AliExpress. The beauty is that their voltage range matches the 3V3 operation voltage of the ESP8266 perfectly. You don&#8217;t need any linear voltage regulator or boost up/down converter which just turn a considerable part of the battery&#8217;s capacity into heat. The discharge characteristic of the LiFePo4 also shows that it keeps providing a ESP8266 compatible voltage over a long time. For simplicity (and due to lack of necessary skills;-)) I decided to use a switch which was already built into the scale as on/off switch. An automatic power-saving circuit would have been nice but that would have complicated the project even more. In the original setup the built-in switch could be used to change between pounds and kilograms, now it will serve as the power switch.</p>
<h1>The complete hardware setup</h1>
<p>The following diagram shows you how to connect all the components together. As suggested earlier I recommend that you wire everything up on a breadboard first. In the next chapter we will to a first smoke test and also a quick calibration of the sensors. Let me know when you are ready;-).</p>
<figure id="attachment_646" aria-describedby="caption-attachment-646" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="646" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/sketch_bb" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?fit=1809%2C1266&amp;ssl=1" data-orig-size="1809,1266" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Smart Scale Setup" data-image-description="" data-image-caption="&lt;p&gt;Smart Scale Setup: HX711 &#8211; ESP8266 (Wemos D1 Mini) &#8211; SSD1306/ SH1106 &#8211; LiFePo4 battery&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?fit=300%2C210&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?fit=730%2C511&amp;ssl=1" class="wp-image-646 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?resize=300%2C210&#038;ssl=1" alt="Smart Scale Setup: HX711 - ESP8266 (Wemos D1 Mini) - SSD1306/ SH1106 - LiFePo4 battery" width="300" height="210" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?resize=300%2C210&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?resize=768%2C537&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?resize=1024%2C717&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?w=1809&amp;ssl=1 1809w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Sketch_bb.png?w=1460&amp;ssl=1 1460w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-646" class="wp-caption-text">Smart Scale Setup: HX711 &#8211; ESP8266 (Wemos D1 Mini) &#8211; SSD1306/ SH1106 &#8211; LiFePo4 battery (click to zoom)</figcaption></figure>
<h1>Smoke Test and Calibration</h1>
<p>While I use the term &#8220;smoke test&#8221; quite often in my daily software engineering routine I only learned recently that the expression originates from electronics: if you turn the device on and there is no smoke coming from the circuit you passed the first phase.</p>
<p>Let&#8217;s do a bit more and use a little program to see if the load cells are responding. While the &#8220;real&#8221; smart scale project will be using the Platformio environment I decided to use the Arduino IDE for this smoke test. This way you will have a starting ground even if you don&#8217;t get adjusted to the Platformio IDE. OK? So let&#8217;s get started:</p>
<ol>
<li>If you haven&#8217;t done so, install the latest Arduino IDE. I am currently using 1.6.9</li>
<li>Download this library as zip file: <a href="https://github.com/bogde/HX711">https://github.com/bogde/HX711</a> and add the zip to the Arduino IDE by Sketch &gt; Include Library&#8230; &gt; Add .ZIP library&#8230;</li>
<li>For the testing of the OLED display also make sure you have my OLED library installed: Sketch &gt; Include Library &gt; Manage libraries&#8230; Search for &#8220;ESP8266 Oled Driver for SSD1306 display&#8221; by Daniel Eichhorn and Fabrice Weinberg. At the time of writing the last version is 3.2.6</li>
<li>Compile and upload the following code:
<pre>#include &lt;HX711.h&gt;

// Scale Settings
const int SCALE_DOUT_PIN = D2;
const int SCALE_SCK_PIN = D3;

HX711 scale(SCALE_DOUT_PIN, SCALE_SCK_PIN);

void setup() {
  Serial.begin(115200);
  scale.set_scale();// &lt;- set here calibration factor!!!
  scale.tare();
}

void loop() {
  float weight = scale.get_units(1);
  Serial.println(String(weight, 2));
}
</pre>
</li>
<li>Now check the serial monitor. If you see some non-static numbers then the HX711 is probably setup correctly.</li>
<li>Now to calibration. Basically you have to use a known weight and adjust the values by a certain factor. I used my kitchen scale and two tetra packs of milk which weight 2.120kg. Put the same weight on the body scale, take the readings and use the result of the reading divided by the expected value as factor in set_scale(..). If that was confusing, check out the following pictures. <strong>Note</strong>: at a later stage you should repeat calibration with bigger weights than just two kilograms, e.g. your own weight. This should increase accuracy&#8230;</li>
</ol>
<figure id="attachment_650" aria-describedby="caption-attachment-650" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.10.58.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="650" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/screenshot-2016-07-22-15-10-58" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.10.58.png?fit=603%2C354&amp;ssl=1" data-orig-size="603,354" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Uncalibrated output" data-image-description="" data-image-caption="&lt;p&gt;Uncalibrated output. You have to call the set_scale with the proper factor&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.10.58.png?fit=300%2C176&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.10.58.png?fit=603%2C354&amp;ssl=1" class="wp-image-650 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.10.58.png?resize=300%2C176&#038;ssl=1" alt="Uncalibrated output. You have to call the set_scale with the proper factor" width="300" height="176" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.10.58.png?resize=300%2C176&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.10.58.png?resize=600%2C350&amp;ssl=1 600w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.10.58.png?w=603&amp;ssl=1 603w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-650" class="wp-caption-text">Uncalibrated output. You have to call the set_scale with the proper factor (click to zoom)</figcaption></figure>
<p>&nbsp;</p>
<figure id="attachment_653" aria-describedby="caption-attachment-653" style="width: 225px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="653" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-50" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?fit=3024%2C4032&amp;ssl=1" data-orig-size="3024,4032" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469198161&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;100&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?fit=225%2C300&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?fit=730%2C973&amp;ssl=1" class="size-medium wp-image-653" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?resize=225%2C300&#038;ssl=1" alt="Kitchen Scale with two tetra packs of 2.12kg as a calibration value" width="225" height="300" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?resize=225%2C300&amp;ssl=1 225w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?resize=768%2C1024&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?resize=300%2C400&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-21.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 225px) 100vw, 225px" /></a><figcaption id="caption-attachment-653" class="wp-caption-text">Kitchen Scale with two tetra packs of 2.12kg as a calibration value</figcaption></figure>
<p>&nbsp;</p>
<figure id="attachment_649" aria-describedby="caption-attachment-649" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.12.06.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="649" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/screenshot-2016-07-22-15-12-06" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.12.06.png?fit=548%2C354&amp;ssl=1" data-orig-size="548,354" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screenshot 2016-07-22 15.12.06" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.12.06.png?fit=300%2C194&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.12.06.png?fit=548%2C354&amp;ssl=1" class="wp-image-649 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.12.06.png?resize=300%2C194&#038;ssl=1" alt="Calibrated output. Now the serial monitor shows the correct values in kg " width="300" height="194" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.12.06.png?resize=300%2C194&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.12.06.png?resize=230%2C150&amp;ssl=1 230w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.12.06.png?w=548&amp;ssl=1 548w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-649" class="wp-caption-text">Calibrated output. Now the serial monitor shows the correct values in kg (click to zoom)</figcaption></figure>
<p>And now as a last step of the smoke test let&#8217;s use the OLED display to show the weight:</p>
<pre>// change if your are using SSD1306
//#include &lt;SSD1306Wire.h&gt;
#include &lt;SH1106Wire.h&gt;
#include &lt;OLEDDisplayFonts.h&gt;
#include &lt;HX711.h&gt;


// Scale Settings
const int SCALE_DOUT_PIN = D2;
const int SCALE_SCK_PIN = D3;

// Display Settings
const int I2C_DISPLAY_ADDRESS = 0x3c;
const int SDA_PIN = D6;
const int SDC_PIN = D7;

HX711 scale(SCALE_DOUT_PIN, SCALE_SCK_PIN);

// change if your are using SSD1306
SH1106Wire        display(I2C_DISPLAY_ADDRESS, SDA_PIN, SDC_PIN);
//SSD1306Wire      display(I2C_DISPLAY_ADDRESS, SDA_PIN, SDC_PIN);

void setup() {
  Serial.begin(115200);
  display.init();
  display.flipScreenVertically();
  scale.set_scale(-47941.0 / 2.122);
  scale.tare();
}

void loop() {
  String weight = String(scale.get_units(1), 2);
  Serial.println(weight);
  display.setFont(ArialMT_Plain_24);
  display.setTextAlignment(TEXT_ALIGN_LEFT);
  display.clear();
  display.drawString(0, 0, weight);
  display.display();
}
</pre>
<figure id="attachment_660" aria-describedby="caption-attachment-660" style="width: 225px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="660" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-51" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?fit=3024%2C4032&amp;ssl=1" data-orig-size="3024,4032" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469204274&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;64&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="image" data-image-description="" data-image-caption="&lt;p&gt;Simple weight output on the OLED display. Smoke test successful!&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?fit=225%2C300&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?fit=730%2C973&amp;ssl=1" class="size-medium wp-image-660" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?resize=225%2C300&#038;ssl=1" alt="Simple weight output on the OLED display. Smoke test successful!" width="225" height="300" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?resize=225%2C300&amp;ssl=1 225w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?resize=768%2C1024&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?resize=300%2C400&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-22.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 225px) 100vw, 225px" /></a><figcaption id="caption-attachment-660" class="wp-caption-text">Simple weight output on the OLED display. Smoke test successful!</figcaption></figure>
<p>If you see now a frequently updated number on the OLED display then: congratulations! You have successfully destroyed a working body scale, removed a lot of parts and put new ones in and it works again! (Why did we do this again!?!)</p>
<h1>Optional: 3D Printed Parts</h1>
<p>There is a saying: when you have a hammer, everything looks like a nail. Well, my current hammer is a Printrbot Play and I am constantly looking for justifications why I spent (only) 400 bucks on a useless machine (my wife thinks so;-)). It so happens that I found two &#8220;nails&#8221; for 3D printing in this project: The AA battery holder and the foot mounts. The battery holder will accommodate the LiFePo4 battery, while the foot mounts became necessary since there wasn&#8217;t enough space beneath the scale for the battery. The battery holder is a wonderful parametric OpenScad project from Thingiverse: <a href="http://www.thingiverse.com/thing:456900">http://www.thingiverse.com/thing:456900</a> Since I only had a single cell I parametrized the print accordingly. The foot mounts I designed myself in OpenScad using the measurements from a digital caliper.</p>
<figure id="attachment_617" aria-describedby="caption-attachment-617" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="617" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-37" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1468860739&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;100&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="AA battery holder" data-image-description="" data-image-caption="&lt;p&gt;3D printed AA battery holder for a single cell from Thingiverse (click to zoom)&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?fit=730%2C548&amp;ssl=1" class="size-medium wp-image-617" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?resize=300%2C225&#038;ssl=1" alt="3D printed AA battery holder for a single cell from Thingiverse (click to zoom)" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-8.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-617" class="wp-caption-text">3D printed AA battery holder for a single cell from Thingiverse (click to zoom)</figcaption></figure>
<p>&nbsp;</p>
<figure id="attachment_624" aria-describedby="caption-attachment-624" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="624" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-44" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469025063&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="3D printed foot mount" data-image-description="" data-image-caption="&lt;p&gt;3D printed foot mount&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?fit=730%2C548&amp;ssl=1" class="size-medium wp-image-624" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?resize=300%2C225&#038;ssl=1" alt="3D printed foot mount" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-15.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-624" class="wp-caption-text">3D printed foot mount</figcaption></figure>
<p>&nbsp;</p>
<figure id="attachment_655" aria-describedby="caption-attachment-655" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.49.35.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="655" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/screenshot-2016-07-22-15-49-35" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.49.35.png?fit=775%2C583&amp;ssl=1" data-orig-size="775,583" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screenshot 2016-07-22 15.49.35" data-image-description="" data-image-caption="&lt;p&gt;Foot Mount designed in OpenScad&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.49.35.png?fit=300%2C226&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.49.35.png?fit=730%2C549&amp;ssl=1" class="size-medium wp-image-655" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.49.35.png?resize=300%2C226&#038;ssl=1" alt="Foot Mount designed in OpenScad" width="300" height="226" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.49.35.png?resize=300%2C226&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.49.35.png?resize=768%2C578&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/Screenshot-2016-07-22-15.49.35.png?w=775&amp;ssl=1 775w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-655" class="wp-caption-text">Foot Mount designed in OpenScad</figcaption></figure>
<p>&nbsp;</p>
<figure id="attachment_628" aria-describedby="caption-attachment-628" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="628" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-48" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469028037&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;160&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="image" data-image-description="" data-image-caption="&lt;p&gt;Hot glued battery holder, foot mount and IKEA gliders on the bottom of the scale&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?fit=730%2C548&amp;ssl=1" class="size-medium wp-image-628" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?resize=300%2C225&#038;ssl=1" alt="Hot glued battery holder, foot mount and IKEA gliders on the bottom of the scale" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-19.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-628" class="wp-caption-text">Hot glued battery holder, foot mount and IKEA gliders at the bottom of the scale</figcaption></figure>
<h1>Summary and Outlook</h1>
<p>This was part 1 of the SmartScale write-up which explained you the hardware setup. After working through this article you now have hopefully a working but still pretty dumb body scale. In part 2 I will guide you through the software setup. If you don&#8217;t want to miss it please sign up for my Newsletter here. You will only ever receive emails related to my project:<br />
<!-- Begin MailChimp Signup Form --></p>
<style type="text/css">
	#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }<br />	/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.<br />	   We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */<br /></style>
<div id="mc_embed_signup">
<form id="mc-embedded-subscribe-form" class="validate" action="//squix.us11.list-manage.com/subscribe/post?u=83e00f93c3f4ef357f69ae940&amp;id=2e9e0766fc" method="post" name="mc-embedded-subscribe-form" novalidate="" target="_blank">
<div id="mc_embed_signup_scroll">
<div class="mc-field-group"><label for="mce-EMAIL">Email Address <span class="asterisk">*</span><br />
</label><br />
<input id="mce-EMAIL" class="required email" name="EMAIL" type="email" value="" /></div>
<div id="mce-responses" class="clear"></div>
<p><!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--></p>
<div style="position: absolute; left: -5000px;"><input tabindex="-1" name="b_83e00f93c3f4ef357f69ae940_2e9e0766fc" type="text" value="" /></div>
<div class="clear"><input id="mc-embedded-subscribe" class="button" name="subscribe" type="submit" value="Subscribe" /></div>
</div>
</form>
</div>
<p><script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script><script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';}(jQuery));var $mcj = jQuery.noConflict(true);</script><br />
<!--End mc_embed_signup--></p>
<p>A few features that the SmartScale will have:</p>
<ul>
<li>Over-the-Air Update: Just turn on the body scale in the bathroom and deploy a new version of the software</li>
<li>Blynk App Integration: see wonderful historical statistics and live data on your smart phone</li>
<li>Change between Kilograms and Pounds through the Blynk App</li>
<li>Energy saving mode: turn off the HX711 and the NodeMCU after 5min of inactivity. This will not be perfect but better than burning through the battery as quickly as possible;-)</li>
<li>Displaying the Weather Forecast, so that you know which clothes to pick after the shower</li>
<li>Do simple settings by using the load cell as input device</li>
</ul>
<figure id="attachment_625" aria-describedby="caption-attachment-625" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="625" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-45" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469026385&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;250&quot;,&quot;shutter_speed&quot;:&quot;0.04&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?fit=730%2C548&amp;ssl=1" class="wp-image-625 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?resize=300%2C225&#038;ssl=1" alt="image" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-16.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-625" class="wp-caption-text">Over-The-Air Update</figcaption></figure>
<figure id="attachment_630" aria-describedby="caption-attachment-630" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-20.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="630" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-49" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-20.jpeg?fit=750%2C274&amp;ssl=1" data-orig-size="750,274" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-20.jpeg?fit=300%2C110&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-20.jpeg?fit=730%2C267&amp;ssl=1" class="wp-image-630 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-20.jpeg?resize=300%2C110&#038;ssl=1" alt="image" width="300" height="110" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-20.jpeg?resize=300%2C110&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-20.jpeg?w=750&amp;ssl=1 750w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-630" class="wp-caption-text">Live and historical data on your Smartphone by using Blynk</figcaption></figure>
<figure id="attachment_540" aria-describedby="caption-attachment-540" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-1.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="540" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-20" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-1.jpeg?fit=553%2C316&amp;ssl=1" data-orig-size="553,316" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1465155950&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.04&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-1.jpeg?fit=300%2C171&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-1.jpeg?fit=553%2C316&amp;ssl=1" class="wp-image-540 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-1.jpeg?resize=300%2C171&#038;ssl=1" alt="image" width="300" height="171" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-1.jpeg?resize=300%2C171&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-1.jpeg?w=553&amp;ssl=1 553w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-540" class="wp-caption-text">Weather ForeCast download from the internet</figcaption></figure>
<figure id="attachment_662" aria-describedby="caption-attachment-662" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="662" data-permalink="https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/image-52" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?fit=3557%2C1568&amp;ssl=1" data-orig-size="3557,1568" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1469204803&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?fit=300%2C132&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?fit=730%2C322&amp;ssl=1" class="wp-image-662 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?resize=300%2C132&#038;ssl=1" alt="image" width="300" height="132" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?resize=300%2C132&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?resize=768%2C339&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?resize=1024%2C451&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-23.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-662" class="wp-caption-text">Choose the user by carefully applying the correct weight on the scale</figcaption></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2016/07/esp8266-turn-a-9-body-scale-into-a-smart-scale-part-1.html/feed</wfw:commentRss>
			<slash:comments>22</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">615</post-id>	</item>
		<item>
		<title>ESP8266 based Plane Spotter &#8211; How To</title>
		<link>https://blog.squix.org/2016/07/esp8266-based-plane-spotter-how-to.html</link>
					<comments>https://blog.squix.org/2016/07/esp8266-based-plane-spotter-how-to.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Sun, 03 Jul 2016 12:40:29 +0000</pubDate>
				<category><![CDATA[ESP8266-projects]]></category>
		<category><![CDATA[ads-b]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[plane spotting]]></category>
		<category><![CDATA[RTL-SDR]]></category>
		<category><![CDATA[weather station]]></category>
		<guid isPermaLink="false">http://blog.squix.org/?p=573</guid>

					<description><![CDATA[When I sit at my living room table I can see wonderful big airplanes in the final approach to Zurich (ZRH) airport or ascending to a far destination: Airbus A380 or Boeing B777 are ingenious proof of what we are capable to design and build. Quite often when ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2016/07/esp8266-based-plane-spotter-how-to.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<p>When I sit at my living room table I can see wonderful big airplanes in the final approach to Zurich (ZRH) airport or ascending to a far destination: Airbus A380 or Boeing B777 are ingenious proof of what we are capable to design and build. Quite often when I have visitors I start flightradar24 to get more information about the airplanes we see. But wouldn&#8217;t it be nice if this information would just be there, anytime I&#8217;m curious &#8211; without starting an app on my smart phone? Since I&#8217;m playing a lot with the ESP8266 it was an obvious choice to build such a device by myself. I actually had already built one a while back with the <a href="https://blog.squix.org/2015/05/esp8266-flight-o-matic.html" target="_blank" rel="noopener">Flight-O-Matic</a> but the setup was quite complicated and the project was dormant for a while. Until I recently discovered a service that provides exactly the information I needed and is free to use as well.<br />
<span id="more-573"></span></p>
<p><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="578" data-permalink="https://blog.squix.org/2016/07/esp8266-based-plane-spotter-how-to.html/image-32" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1467544642&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.04&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="#ESP8266 Plane Spotter" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?fit=730%2C548&amp;ssl=1" class="aligncenter size-medium wp-image-578" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?resize=300%2C225&#038;ssl=1" alt="#ESP8266 Plane Spotter" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-3.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><strong>What you&#8217;ll need</strong></p>
<p>In order to get this project running you&#8217;ll need the following list of hardware:</p>

<table id="tablepress-2" class="tablepress tablepress-id-2">
<tbody class="row-striping row-hover">
<tr class="row-1">
	<td class="column-1"><a href="https://shop.squix.ch/index.php/esp8266-boards/nodemcu-lua-esp8266-esp-12e-wifi-development-board.html"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone wp-image-286 size-thumbnail" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/03/NodeMCU_DEVKIT_1.0-150x150.jpg?resize=100%2C100" alt="Continuous Delivery on ESP8266" width="100" height="100" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/03/NodeMCU_DEVKIT_1.0.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/03/NodeMCU_DEVKIT_1.0.jpg?zoom=2&amp;resize=100%2C100&amp;ssl=1 200w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/03/NodeMCU_DEVKIT_1.0.jpg?zoom=3&amp;resize=100%2C100&amp;ssl=1 300w" sizes="(max-width: 100px) 100vw, 100px" /></a></td><td class="column-2"><a href="http://forum.banggood.com/Geekcreit-Doit-NodeMcu-Lua-ESP8266-ESP-12E-WIFI-Development-Board-p-985891.html?p=6R31122484684201508S" target="_blank">NodeMCU ESP8266 module</a> or <a href="http://forum.banggood.com/D1-Mini-NodeMcu-Lua-WIFI-ESP8266-Development-Board-p-1044858.html?p=6R31122484684201508S" target="_blank">Wemos D1 Mini</a></td>
</tr>
<tr class="row-2">
	<td class="column-1"><a href="https://shop.squix.ch/index.php/sensor-modules/0-96-inch-4pin-white-i2c-oled-display-module-for-esp8266.html"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone wp-image-256 size-thumbnail" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/05/display-150x150.jpg?resize=100%2C100" alt="display" width="100" height="100" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/05/display.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/05/display.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/05/display.jpg?w=320&amp;ssl=1 320w" sizes="(max-width: 100px) 100vw, 100px" /></a></td><td class="column-2"><a href="http://forum.banggood.com/0_96-Inch-4Pin-White-IIC-I2C-OLED-Display-Module-12864-LED-For-Arduino-p-958196.html?p=6R31122484684201508S" target="_blank">0.96" SSD1306 OLED display</a></td>
</tr>
<tr class="row-3">
	<td class="column-1"><a href="https://shop.squix.ch/index.php/accessories/40pcs-20cm-female-to-female-jumper.html"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-thumbnail wp-image-607" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/JumperFF-150x150.jpg?resize=100%2C100" alt="JumperFF" width="100" height="100" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/JumperFF.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/JumperFF.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/JumperFF.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/JumperFF.jpg?w=600&amp;ssl=1 600w" sizes="(max-width: 100px) 100vw, 100px" /></a></td><td class="column-2">A few connectors and USB Wire</td>
</tr>
<tr class="row-4">
	<td class="column-1"><a href="https://shop.squix.ch/index.php/esp8266/weatherstation-kit-30.html"><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone wp-image-246 size-thumbnail" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/06/WeatherStationKit-2-150x150.jpg?resize=100%2C100" alt="WeatherStationKit-2" width="100" height="100" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/06/WeatherStationKit-2.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/06/WeatherStationKit-2.jpg?zoom=2&amp;resize=100%2C100&amp;ssl=1 200w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/06/WeatherStationKit-2.jpg?zoom=3&amp;resize=100%2C100&amp;ssl=1 300w" sizes="(max-width: 100px) 100vw, 100px" /></a></td><td class="column-2">Or order a complete <a href="https://blog.squix.org/product/weatherstation-kit-w-white-oled" target="_blank">starter kit for USD $19.90 (incl. shipping)</a> from my shop <B>and support this blog</B>.<br />
<p><br />
Do you live in the US? Then you can also order the Kit <a href="https://www.amazon.com/ESP8266-Starter-OLED-display-Arduino/dp/B01KE7BA3O/">from Amazon</a><br />
<br />
</p></td>
</tr>
</tbody>
</table>
<!-- #tablepress-2 from cache -->
<p>Depending on the coverage of adsbexchange.com feeders in your area you might also buy the following items:</p>
<ul>
<li><a href="http://forum.banggood.com/Raspberry-Pi-3-Model-B-ARM-Cortex-A53-CPU-1_2GHz-64-Bit-Quad-Core-1GB-RAM-10-Times-B-p-1041862.html?p=6R31122484684201508S" target="_blank" rel="noopener">Raspberry Pi</a> (Model 3 recommended but also works with older versions and probably Zero)</li>
<li><a href="/go/sdr-dvb-t-dongle" target="_blank" rel="noopener">RTL-SDR dongle</a> for receiving the ADS-B signal</li>
<li><a href="https://www.banggood.com/LD-32GB-Class-10-Data-Storage-TF-Card-Flash-Memory-Card-for-Mobile-Phone-p-975787.html?p=6R31122484684201508S&#038;custlinkid=1587752" target="_blank" rel="noopener">Micro SD card</a> for Raspberry Pi (for Model 3 or with adapter, depending on your RasPi model)</li>
</ul>
<p>&nbsp;</p>
<p><strong>The Service &#8211; ADSBExchange</strong></p>
<p>At the core of this project is the excellent service provided by Dan Streufert and countless people feeding live transponder signals into it: <a href="http://adsbexchange.com" target="_blank" rel="noopener">http://adsbexchange.com</a>. From what I understand it is built on top of the <a href="http://www.virtualradarserver.co.uk/" target="_blank" rel="noopener">http://www.virtualradarserver.co.uk/</a> project and lets you query live position data based on location, distance to a point, altitude etc and returns a JSON object which you can process in your code. Please note: in order to keep this service free-to-use Dan depends on your support, either <strong>by donating money</strong> to cover the server hosting costs or <strong>by providing your local data</strong> to improve coverage.</p>
<p><strong>Note, this step is optional:</strong> When I first checked the coverage of the Zurich airport wasn&#8217;t so great so I decided to reactivate my RTL-SDR DVB-T dongle (see posts <a href="https://blog.squix.org/2015/03/rtl-sdr-tracking-airplanes-for-11.html" target="_blank" rel="noopener">here</a>, <a href="https://blog.squix.org/2015/03/rtl-sdr-quick-guide-to-software-defined.html" target="_blank" rel="noopener">here</a> and <a href="https://blog.squix.org/2015/05/esp8266-flight-o-matic.html" target="_blank" rel="noopener">here</a>) and contribute live data to adsbexchange.com. If the coverage in your area is insufficient consider to setup such a feeder as well.</p>
<p>Once you have the hardware (see above, Raspberry Pi and RTL-SDR dongle) you can either do the setup manually or take a short cut by becoming a flightaware feeder and using their ready-to-feed sd-card image called PiAware: <a href="http://flightaware.com/adsb/piaware/install" target="_blank" rel="noopener">http://flightaware.com/adsb/piaware/install</a>. Once you have done that you have to setup your PiAware instance to also feed to adsbexchange.com by running a script provided by Dan: <a href="http://www.adsbexchange.com/how-to-feed/" target="_blank" rel="noopener">http://www.adsbexchange.com/how-to-feed/</a></p>
<p>&nbsp;</p>
<p><strong>The Plane Spotter Hardware</strong></p>
<p>Once you are sure you have a good coverage of your area of interest you can start to get to the actual plane spotter hardware. I recommend to either use the components provided by my <a href="https://blog.squix.org/product/weatherstation-kit-w-white-oled" target="_blank" rel="noopener">IoT Starter Kit</a> or to get the setup I described in <a href="https://blog.squix.org/2016/06/esp8266-hack-piggybacking-oled-display-on-wemos-d1-mini.html" target="_blank" rel="noopener">this post using the Wemos D1 Mini</a> which requires soldering but yields a very compact setup. The wiring is described <a href="https://blog.squix.org/weatherstation-wiring-and-first-run" target="_blank" rel="noopener">here</a>.</p>
<p>&nbsp;</p>
<p><strong>The Code</strong></p>
<p><strong>UPDATE: </strong>this section describes the Platformio IDE project setup. In the meantime I have made it available also as example project in the WeatherStation library. <a href="https://blog.squix.org/2016/09/esp8266-based-plane-spotter-now-for-arduino-ide.html">Read more about it here</a> if you prefer the Arduino IDE.</p>
<p>In my recent ESP8266 projects I started switching to the <a href="https://blog.squix.org/2016/01/esp8266-arduino-ide-alternative.html" target="_blank" rel="noopener">PlatformIO IDE</a> since it is a lot more convenient to use compared to the Arduino IDE: automatic library dependency management, better coding support in the editor and great <a href="https://blog.squix.org/2016/06/esp8266-continuous-delivery-pipeline-push-to-production.html" target="_blank" rel="noopener">Travis CI and even Continuous Delivery</a> support. So please make sure that you have a running IDE before you get started with the code. Once you have that ready please checkout the code from <a href="https://github.com/squix78/esp8266-plane-spotter" target="_blank" rel="noopener">my github repository</a>.</p>
<p>Now the most important part is to configure the QUERY_STRING variable in the main.cpp file:</p>
<blockquote><p>const String QUERY_STRING = &#8220;lat=47.424341887&amp;lng=8.568778038&amp;fDstL=0&amp;fDstU=10&amp;fAltL=0&amp;fAltL=1500&amp;fAltU=10000&#8221;;</p></blockquote>
<p>For a detailed description please checkout the documentation of the <a href="http://www.virtualradarserver.co.uk/Documentation/Formats/AircraftList.aspx" target="_blank" rel="noopener">virtual radar server</a>. What my example does is to filter out all aircrafts which are not within 10km from a location south of the runway and above 1500 feet (I don&#8217;t care about landed airplanes) or above 10000 feet (I also don&#8217;t care about transit airplanes). There are many options to adapt this query to your needs, so please carefully read the afore mentioned documentation. Once you are ready with the query you can flash the firmware on your ESP8266 chip.</p>
<figure id="attachment_612" aria-describedby="caption-attachment-612" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/GeoFencing.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="612" data-permalink="https://blog.squix.org/2016/07/esp8266-based-plane-spotter-how-to.html/geofencing" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/GeoFencing.png?fit=758%2C552&amp;ssl=1" data-orig-size="758,552" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Geo Fencing the rest call" data-image-description="" data-image-caption="&lt;p&gt;Geo fencing the rest call limits the results to airplanes visible to your location&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/GeoFencing.png?fit=300%2C218&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/GeoFencing.png?fit=730%2C532&amp;ssl=1" class="size-medium wp-image-612" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/GeoFencing.png?resize=300%2C218&#038;ssl=1" alt="Geo fencing the rest call limits the results to airplanes visible to your location" width="300" height="218" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/GeoFencing.png?resize=300%2C218&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/GeoFencing.png?w=758&amp;ssl=1 758w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-612" class="wp-caption-text">Geo fencing the rest call limits the results to airplanes visible to your location</figcaption></figure>
<p>&nbsp;</p>
<p><strong>First Run &amp; Adapting it</strong></p>
<p>Since the ESP8266 is fetching the data from the internet you&#8217;ll have to connect the module to the internet. My code is using the excellent <a href="https://github.com/tzapu/WiFiManager" target="_blank" rel="noopener">WifiManager</a> library. If your ESP8266 cannot connect to a (known) access point it will start an AP by itself and allow you to connect through your Wifi settings to it. A captive portal window opens and lets you select the correct SSID and enter the password. It then stores the Wifi settings on flash and will use it in the future.</p>
<p>If everything works you can go on and change the way the data is displayed or extract more data from the adsbexchange json object. It would be great if you could share your results with me either here in the comments or on Twitter. I&#8217;ll be happy to share it with the community.</p>
<figure id="attachment_576" aria-describedby="caption-attachment-576" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="576" data-permalink="https://blog.squix.org/2016/07/esp8266-based-plane-spotter-how-to.html/image-30" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1467544614&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;25&quot;,&quot;shutter_speed&quot;:&quot;0.00052002080083203&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?fit=730%2C548&amp;ssl=1" class="wp-image-576 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?resize=300%2C225&#038;ssl=1" alt="Verification: airplane starting from ZRH airport" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-1.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-576" class="wp-caption-text">Visual Data verification: Airplane starting from ZRH airport</figcaption></figure>
<p><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="583" data-permalink="https://blog.squix.org/image-35" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?fit=4032%2C2006&amp;ssl=1" data-orig-size="4032,2006" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1467544635&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;25&quot;,&quot;shutter_speed&quot;:&quot;0.02&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image" data-image-description="" data-image-caption="" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?fit=300%2C149&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?fit=730%2C363&amp;ssl=1" class="aligncenter wp-image-583 size-medium" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?resize=300%2C149&#038;ssl=1" width="300" height="149" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?resize=300%2C149&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?resize=768%2C382&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?resize=1024%2C509&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/07/image-6.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><strong>Summary</strong></p>
<p>You can build a cute little plane spotting tool with just a few components for under $20 without much work. If the coverage of your area on adsbexchange is poor then you could become a data feeder for about $50.- more (Raspberry Pi + RTL-SDR Dongle). Playing with the real-time data is fun and can be a very rewarding weekend project!</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2016/07/esp8266-based-plane-spotter-how-to.html/feed</wfw:commentRss>
			<slash:comments>50</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">573</post-id>	</item>
		<item>
		<title>New Weather Station Demo on Github</title>
		<link>https://blog.squix.org/2016/06/new-weather-station-demo-on-github.html</link>
					<comments>https://blog.squix.org/2016/06/new-weather-station-demo-on-github.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Mon, 13 Jun 2016 19:06:16 +0000</pubDate>
				<category><![CDATA[ESP8266 Weather Station]]></category>
		<category><![CDATA[platformio]]></category>
		<category><![CDATA[weather station]]></category>
		<category><![CDATA[Wifi Manager]]></category>
		<guid isPermaLink="false">http://blog.squix.org/?p=560</guid>

					<description><![CDATA[I have been working on a new demo of the Weather Station which is built as a platformio project. It has a few features which are not in the library demo: Wifi Signal Quality icon in overlay Weather Icon, temperature and time in overlay By ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2016/06/new-weather-station-demo-on-github.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<p>I have been working on a new demo of the Weather Station which is built as a platformio project. It has a few features which are not in the library demo:</p>
<ul>
<li>Wifi Signal Quality icon in overlay</li>
<li>Weather Icon, temperature and time in overlay</li>
<li>By using Wifi Manager you can keep the wifi passwords out of your source code</li>
</ul>
<p><span id="more-560"></span></p>
<p><iframe loading="lazy" src="https://www.youtube.com/embed/Gs6OLLIxSLw" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p><strong>How to get it running?</strong></p>
<p>Download the Platformio IDE from <a href="http://platformio.org/platformio-ide" target="_blank">here</a> for your operating system and clone <a href="https://github.com/squix78/esp8266-weather-station-platformio-demo" target="_blank">my github project</a>. Now open the IDE and open the weather station project folder. No more need to install libraries manually, the platformio.ini file does this for you! You might still have to adapt:</p>
<ul>
<li>Your display pins (SDA &amp; SCL)</li>
<li>The Wunderground API key, location and language</li>
<li>Your Thinkspeak credentials</li>
</ul>
<p>&nbsp;</p>
<p><strong>Source Code</strong></p>
<ul>
<li><a href="https://github.com/squix78/esp8266-weather-station-platformio-demo" target="_blank">https://github.com/squix78/esp8266-weather-station-platformio-demo</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2016/06/new-weather-station-demo-on-github.html/feed</wfw:commentRss>
			<slash:comments>46</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">560</post-id>	</item>
		<item>
		<title>ESP8266-Hack &#8211; Piggybacking OLED display on WeMos D1 Mini</title>
		<link>https://blog.squix.org/2016/06/esp8266-hack-piggybacking-oled-display-on-wemos-d1-mini.html</link>
					<comments>https://blog.squix.org/2016/06/esp8266-hack-piggybacking-oled-display-on-wemos-d1-mini.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Thu, 09 Jun 2016 19:24:51 +0000</pubDate>
				<category><![CDATA[ESP8266 Hacks]]></category>
		<category><![CDATA[ESP8266-projects]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[weather station]]></category>
		<category><![CDATA[WeMos D1 Mini]]></category>
		<guid isPermaLink="false">http://blog.squix.org/?p=555</guid>

					<description><![CDATA[Inspired by Mike Rankin&#8217;s (@mikerankin) beautiful crossovers between an ESP8266 ESP-01 and an 0.96 Inch OLED I2C display I decided to try if there wasn&#8217;t an easy hack to marry the two components with as  little soldering as possible. After turning, connecting and flashing different combinations of ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2016/06/esp8266-hack-piggybacking-oled-display-on-wemos-d1-mini.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<p>Inspired by Mike Rankin&#8217;s (<a href="https://twitter.com/mikerankin" target="_blank" rel="noopener">@mikerankin</a>) beautiful crossovers between an ESP8266 ESP-01 and an 0.96 Inch OLED I2C display I decided to try if there wasn&#8217;t an easy hack to marry the two components with as  little soldering as possible.<span id="more-555"></span></p>
<p>After turning, connecting and flashing different combinations of the two modules I finally found one that only requires you to solder 4 connections. Assuming that your display&#8217;s connectors are in the order GND, VCC, SCL and SDA just place the display on the bottom of your WeMos D1 Mini so that the two GND&#8217;s are connected with each other. VCC connects to D4, SCL to D3 and SDA to D2. I&#8217;m aware that I am &#8220;cheating&#8221; the D4 connector into being the power source, but I couldn&#8217;t find any data about the max. current the display draws. If you want to be 100% save add a connection between VCC (on the display) and 3V3 instead. Let me know in the comments if you are convinced that I&#8217;m doing something reckless.</p>
<figure id="attachment_554" aria-describedby="caption-attachment-554" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="554" data-permalink="https://blog.squix.org/2016/06/esp8266-hack-piggybacking-oled-display-on-wemos-d1-mini.html/image-27" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1465499443&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="WeMos D1 Mini Oled Display Hack" data-image-description="" data-image-caption="&lt;p&gt;128&#215;64 OLED display directly soldered on a WeMos D1 Mini Running the Weather Station Code&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?fit=730%2C548&amp;ssl=1" class="size-medium wp-image-554" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?resize=300%2C225&#038;ssl=1" alt="128x64 OLED display directly soldered on a WeMos D1 Mini" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-8.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-554" class="wp-caption-text">128&#215;64 OLED display directly soldered on a WeMos D1 Mini running the Weather Station Code</figcaption></figure>
<figure id="attachment_552" aria-describedby="caption-attachment-552" style="width: 300px" class="wp-caption aligncenter"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" data-attachment-id="552" data-permalink="https://blog.squix.org/2016/06/esp8266-hack-piggybacking-oled-display-on-wemos-d1-mini.html/image-25" data-orig-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?fit=4032%2C3024&amp;ssl=1" data-orig-size="4032,3024" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;2.2&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;iPhone 6s&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1465499425&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;4.15&quot;,&quot;iso&quot;:&quot;200&quot;,&quot;shutter_speed&quot;:&quot;0.03030303030303&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}" data-image-title="Back Side of OLED display WeMos D1 Mini Hack" data-image-description="" data-image-caption="&lt;p&gt;128&#215;64 OLED display directly soldered on a WeMos D1 Mini Running the Weather Station Code&lt;/p&gt;
" data-medium-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?fit=300%2C225&amp;ssl=1" data-large-file="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?fit=730%2C548&amp;ssl=1" class="size-medium wp-image-552" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?resize=300%2C225&#038;ssl=1" alt="128x64 OLED display directly soldered on a WeMos D1 Mini Running the Weather Station Code" width="300" height="225" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?resize=300%2C225&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?resize=768%2C576&amp;ssl=1 768w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?w=1460&amp;ssl=1 1460w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/06/image-6.jpeg?w=2190&amp;ssl=1 2190w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-552" class="wp-caption-text">WeMos D1 Mini with Piggyback Oled display</figcaption></figure>
<p>If you are following my VCC-D4 hack from above make sure that you enable D4 for output and to set it to HIGH:</p>
<blockquote><p>pinMode(D4, OUTPUT);<br />
digitalWrite(D4, HIGH);</p></blockquote>
<p>&nbsp;</p>
<p><strong>Resources</strong></p>
<ul>
<li><a href="https://github.com/squix78/esp8266-weather-station" target="_blank" rel="noopener">WeatherStation on Github</a></li>
</ul>
<p>&nbsp;</p>
<p><strong>Shopping List</strong></p>
<ul>
<li><a href="https://blog.squix.org/product/1632" target="_blank" rel="noopener">WeatherStation Kit for Soldering</a> (you are supporting my blog)</li>
<li><a href="https://www.banggood.com/Geekcreit-0_96-Inch-4Pin-White-IIC-I2C-OLED-Display-Module-12864-LED-Geekcreit-for-Arduino-products-that-work-with-official-Arduino-boards-p-958196.html?p=0P21061109440201501M&amp;custlinkid=1587780" target="_blank" rel="noopener">SSD1306 0.96 Inch Oled Display</a> (from Banggood)</li>
<li><a href="/go/wemosd1mini" target="_blank" rel="noopener">WeMos D1 Mini</a> (from Banggood)</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2016/06/esp8266-hack-piggybacking-oled-display-on-wemos-d1-mini.html/feed</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">555</post-id>	</item>
		<item>
		<title>ESP8266: SSD1306 Oled Library Release</title>
		<link>https://blog.squix.org/2016/06/esp8266-ssd1306-oled-library-release.html</link>
					<comments>https://blog.squix.org/2016/06/esp8266-ssd1306-oled-library-release.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Sun, 05 Jun 2016 17:53:22 +0000</pubDate>
				<category><![CDATA[ESP8266 Peripherals]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[OLED]]></category>
		<category><![CDATA[SSD1306]]></category>
		<category><![CDATA[weather station]]></category>
		<guid isPermaLink="false">http://blog.squix.org/?p=538</guid>

					<description><![CDATA[The &#8220;ESP8266 OLED SSD1306&#8243; is an open source library which allows you to control those pretty OLED modules from our beloved ESP8266 module. Fabrice Weinberg cleaned up all the ugly pieces of code which I initially wrote caused by my near C/C++ illiteracy. He also added support for ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2016/06/esp8266-ssd1306-oled-library-release.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<p>The &#8220;<a href="https://github.com/squix78/esp8266-oled-ssd1306">ESP8266 OLED SSD1306&#8243;</a> is an open source library which allows you to control <a href="https://www.banggood.com/Geekcreit-0_96-Inch-4Pin-White-IIC-I2C-OLED-Display-Module-12864-LED-Geekcreit-for-Arduino-products-that-work-with-official-Arduino-boards-p-958196.html?p=0P21061109440201501M&amp;custlinkid=1587780">those pretty OLED modules</a> from our beloved ESP8266 module. <a href="https://github.com/FWeinb">Fabrice Weinberg</a> cleaned up all the ugly pieces of code which I initially wrote caused by my near C/C++ illiteracy. He also added support for Pasko&#8217;s <a href="https://github.com/pasko-zh/brzo_i2c" target="_blank" rel="noopener">BRZO I2C</a> library which is partially written in assembler and allows a much higher throughput over the I2C channel.<span id="more-538"></span></p>
<p>Fabrice&#8217;s video below compares the the two I2C implementations:</p>
<p><iframe loading="lazy" src="https://player.vimeo.com/video/168362918" width="640" height="360" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>Other changes:</p>
<ul>
<li>The font format was refactored for better memory efficiency and the web based font generator (<a href="http://oleddisplay.squix.ch/" target="_blank" rel="noopener">http://oleddisplay.squix.ch/</a>) now lets you generate font files for the older library versions or the new ones</li>
<li>The hardware protocol level implementations (SPI, I2C) have been separated from the low level graphical functions. This affects how you instantiate the display classes</li>
<li>To be open for future support of similar displays the core classes were renamed to Oled* instead of SSD1306</li>
<li>More graphical functions have been added, including drawing of circles, non-vertical lines and a progress bar</li>
<li>In case you want to use the display for simple log output you can now use print(..) and println(..) and the library will take care of scrolling. See Fabrice&#8217;s video below:</li>
</ul>
<p>&nbsp;</p>
<p><iframe loading="lazy" src="https://www.youtube.com/embed/8Fiss77A3TE" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>&nbsp;</p>
<p>For a full list of new features and how to upgrade your existing code please have a look at the comprehensive upgrade guide: <a href="https://github.com/squix78/esp8266-oled-ssd1306/blob/master/UPGRADE-3.0.md">https://github.com/squix78/esp8266-oled-ssd1306/blob/master/UPGRADE-3.0.md</a></p>
<p><strong>Please note:</strong> this release will break with your code based on the older 2.0.0 version. In case you have created fonts you&#8217;ll have to re-generate them as well. This also affects the <a href="https://github.com/squix78/esp8266-weather-station">Weather Station</a> library!</p>
<p>Many thanks again to <strong>Fabrice Weinberg</strong> and all other contributors to make this release possible!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2016/06/esp8266-ssd1306-oled-library-release.html/feed</wfw:commentRss>
			<slash:comments>28</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">538</post-id>	</item>
		<item>
		<title>ESP8266 Weather Station: Measuring Inside and Outside Temperature &#8211; Part 2</title>
		<link>https://blog.squix.org/2016/01/esp8266-weather-station-measuring.html</link>
					<comments>https://blog.squix.org/2016/01/esp8266-weather-station-measuring.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Mon, 04 Jan 2016 20:16:00 +0000</pubDate>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[ESP8266-projects]]></category>
		<category><![CDATA[Climate Node]]></category>
		<category><![CDATA[DHT22]]></category>
		<category><![CDATA[thingspeak]]></category>
		<category><![CDATA[weather station]]></category>
		<guid isPermaLink="false">http://blog.squix.org/2016/01/04/esp8266-weather-station-measuring/</guid>

					<description><![CDATA[&#60;Measuring Inside and Outside Part 1 In Part 1 of this series you learned how to connect a DHT temperature/humidity sensor directly to your WeatherStation and to display the readings as an additional frame in the carousel rotation. In this second part I will show ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2016/01/esp8266-weather-station-measuring.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;"><a href="https://blog.squix.org/2015/12/esp8266-weather-station-measuring-2.html"><strong>&lt;Measuring Inside and Outside Part 1</strong></a></div>
<div dir="ltr" style="text-align: left;"></div>
<div dir="ltr" style="text-align: left;">
<p>In Part 1 of this series you learned how to connect a DHT temperature/humidity sensor directly to your WeatherStation and to display the readings as an additional frame in the carousel rotation. In this second part I will show you how to setup a sensor node and post the readings to a free cloud service before fetching them on a WeatherStation (in another room) and displaying them there.<a name="more"></a></p>
<h3 style="text-align: left;">Requirements</h3>
<div>For the sensor node you&#8217;ll need:</div>
<div>
<ul style="text-align: left;">
<li><a href="https://www.banggood.com/custlink/KKmhNy2sgy" target="_blank" rel="noopener">NodeMCU ESP8266 module (or any other ESP8266)</a></li>
<li><a href="https://www.banggood.com/custlink/3vvEnRzn6J" target="_blank" rel="noopener">DHT22 sensor</a></li>
<li><a href="https://www.banggood.com/custlink/GKKhbYknBj" target="_blank" rel="noopener">3 female-female wires</a></li>
<li>USB power supply</li>
</ul>
<div>You can either order these items from Banggood, from <a href="https://blog.squix.org/product/weatherstation-kit-w-white-oled" target="_blank" rel="noopener">my own online shop</a> or if you life in the US from <a href="https://www.amazon.com/ESP8266-Starter-OLED-display-Arduino/dp/B01KE7BA3O/" target="_blank" rel="noopener">Amazon</a>. I assume that you have already a working <a href="https://blog.squix.org/product/weatherstation-kit-w-white-oled" target="_blank" rel="noopener">WeatherStation</a>.</div>
</div>
<div></div>
<h3 style="text-align: left;">Wiring</h3>
<div>The climate node is relatively easy to wire. The DHT breakout board has only three connectors: GND (Ground), VCC (connect to 3.3V) and DAT which is the data line that we connect to pin D6 on the NodeMCU</div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="https://i0.wp.com/1.bp.blogspot.com/-vxVSenRtmxQ/VorT-YRIEFI/AAAAAAAAAio/JFnAujsi-Gk/s1600/ClimateNodeSketchWithDHT22_bb.png"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/01/ClimateNodeSketchWithDHT22_bb.png?resize=253%2C320&#038;ssl=1" width="253" height="320" border="0" /></a></div>
<div></div>
<h3 style="text-align: left;">Thingspeak</h3>
<div>Thingspeak is a free cloud service which allows you to easily post (sensor) data, to visualize it and to retrieve it again using simple HTTP methods. I&#8217;d like to point out that you could also use Wunderground to store your climate data and it probably would be very easy to do as well. But I believe that for education purposes Thingspeak allows you more degrees of freedom. After all you could also send them read outs from a motion sensor or similar things. Thingspeak has some nice additional features which lets you program webhooks to trigger a push notification on your cell phone, etc.</div>
<div></div>
<div>So first of all you have to <b>sign up</b> for a (free) account on Thingspeak. Go to <a href="https://thingspeak.com/users/sign_up" target="_blank" rel="noopener">https://thingspeak.com/users/sign_up</a> and create the account. After you completed that process, log in to your new account and go to &#8220;My Channels&#8221;:</div>
<div></div>
<div></div>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="https://i0.wp.com/2.bp.blogspot.com/-StqAO0ixxjk/VorXASpwe9I/AAAAAAAAAi0/JaJxObS3kOw/s1600/Thingspeak1.png"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/01/Thingspeak1.png?resize=320%2C105&#038;ssl=1" width="320" height="105" border="0" /></a></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div>There you click on the &#8220;New Channel&#8221; button. Then fill out the form:</div>
<div></div>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="https://i0.wp.com/2.bp.blogspot.com/-FVYgOL9_6FY/VorXel6MR2I/AAAAAAAAAi8/BqXa3vz3Dds/s1600/Thingspeak2.png"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/01/Thingspeak2.png?resize=320%2C201&#038;ssl=1" width="320" height="201" border="0" /></a></div>
<div></div>
<div>Explanation: The name just helps you to recognize your channel among many others that you might create over time. The important part are the field names. This name will later show up in the chart and with this I&#8217;m telling Thingspeak that the value I&#8217;m sending later with the field1 attribute should be displayed as Temperature.</div>
<div></div>
<div>Now navigate to the API Keys tab and note the two generated keys:</div>
<div></div>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="https://i0.wp.com/1.bp.blogspot.com/-ipsIdgu8QN4/VorZhso6VpI/AAAAAAAAAjQ/XRvuzExl4Wk/s1600/Thingspeak4.png"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/01/Thingspeak4.png?resize=298%2C320&#038;ssl=1" width="298" height="320" border="0" /></a></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<div>The first one will allow you to write to this channel in Thingspeak and the second one will allow you to read from it later. Treat them as secrets and with care. Others might be able to spam your channel or to &#8220;steal&#8221; your data. (BTW: I regenerated the keys after taking a screenshot;-)). We will use these keys soon enough&#8230; Also note the channel ID on top of the screen&#8230;</div>
<div></div>
<h3 style="text-align: left;">Programming the Climate Node</h3>
<div>Now we have all ingredients to post the climate data to Thingspeak. We just have to program the ESP8266 accordingly. Go to <a href="https://github.com/squix78/esp8266-dht-thingspeak-logger" target="_blank" rel="noopener">https://github.com/squix78/esp8266-dht-thingspeak-logger</a> and download the code as Zip file (or do a git check out, if you know what that means).</div>
<div>Now adapt the settings to your needs:</div>
<div></div>
<div></div>
<div></div>
<div>
<p>Especially the <b>Wifi settings and the Thingspeak API key </b>have to be updated. Take the Write API key from the previous step here. For testing you might also play with the update interval which is a number in seconds. Please be aware that the minimum update interval in Thingspeak is about 15 seconds. Below your updates will just be ignored.Now flash your program to the Node MCU and your Climate node should start logging. To check the results you can go back to Thingspeak and look at the charts:</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="https://i0.wp.com/4.bp.blogspot.com/-dQoWgnfSoOE/Vorc2r4TsfI/AAAAAAAAAjc/dAXpgPG8R2s/s1600/Thingspeak5.png"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/01/Thingspeak5.png?resize=230%2C320&#038;ssl=1" width="230" height="320" border="0" /></a></div>
<div class="separator" style="clear: both; text-align: center;"></div>
<h3 style="text-align: left;">Displaying the data on the WeatherStation</h3>
</div>
<div>Now to the real easy part. Like a cook in the TV kitchen I have prepared this step a long time ago (possibly to your confusion;-)). The WeatherStationDemo that comes as an example with the WeatherStation library already contains everything needed to display your own Climate Node data:</div>
<div></div>
<div></div>
<div></div>
<div>
<p>Look for these lines in the demo and replace the read api key and the channel ID with the ones you got in the Thingspeak step. If you didn&#8217;t remove the climate node section in your weather station code you just need to flash your WeatherStation with the updated API key and channel ID and voilà: you just successfully sent the temperature and humidity data from the next room once around the world just to display it on a tiny OLED display. I know some people (including my wife) who wouldn&#8217;t be impressed by that at all;-).<b>Explanation: </b>This last step might have been a bit confusing, since the tv cook had prepared everything hours before the TV show actually started, so here the summary in slow motion: the Weather Station library now comes with a class called Thingspeak client which does all the leg work. You pass in the channel id and API key and it downloads a JSON object and picks out just the last data set, since we are currently interested only in that. Have a look at <a href="https://github.com/ThingPulse/esp8266-weather-station/blob/master/src/ThingspeakClient.cpp" target="_blank" rel="noopener">https://github.com/ThingPulse/esp8266-weather-station/blob/master/src/ThingspeakClient.cpp</a> to understand what happens and maybe adapt/ extend it to your needs. Why not display the chart of the last 24 hours on the OLED display?</p>
<p><a href="https://blog.squix.org/2015/12/esp8266-weather-station-measuring-2.html"><strong>&lt;Measuring Inside and Outside Part 1</strong></a></p>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2016/01/esp8266-weather-station-measuring.html/feed</wfw:commentRss>
			<slash:comments>20</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">12</post-id>	</item>
		<item>
		<title>Weather Station in an Old Nokia Phone</title>
		<link>https://blog.squix.org/2016/01/weather-station-in-old-nokia-phone.html</link>
					<comments>https://blog.squix.org/2016/01/weather-station-in-old-nokia-phone.html#respond</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Sun, 03 Jan 2016 19:49:00 +0000</pubDate>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[Nokia Phone]]></category>
		<category><![CDATA[weather station]]></category>
		<guid isPermaLink="false">http://blog.squix.org/2016/01/03/weather-station-in-old-nokia-phone/</guid>

					<description><![CDATA[Today I got a wonderful email from Jens Lochmüller from Germany which shows that necessity is truly the mother of invention. He wanted to build a case for the Weather Station with a picture frame but since he didn&#8217;t have an unused one at home ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2016/01/weather-station-in-old-nokia-phone.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Today I got a wonderful email from <b>Jens Lochmüller from Germany</b> which shows that necessity is truly the mother of invention. He wanted to build a case for the Weather Station with a picture frame but since he didn&#8217;t have an unused one at home and the shops were closed today he just put it into the case of an old Nokia phone. If I had to guess I would say it is a Nokia 1110 or 1112.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://i0.wp.com/1.bp.blogspot.com/-ga-RJIU7tek/VomJ8O0jCfI/AAAAAAAAAiY/cA4i0J54-a0/s1600/WeatherStationNokia.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img data-recalc-dims="1" loading="lazy" decoding="async" border="0" height="200" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/01/WeatherStationNokia.png?resize=164%2C200&#038;ssl=1" width="164" /></a></div>
<p>Do you have other examples how you gave the Weather Station a new home? Please send me examples and I&#8217;m happy to blog about it!</p>
<p>Watch the full movie:</p></div>
<p><iframe loading="lazy" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/w1v-kAHoDqE" width="420"></iframe></div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2016/01/weather-station-in-old-nokia-phone.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">13</post-id>	</item>
		<item>
		<title>ESP8266 Weather Station: World Clock Demo</title>
		<link>https://blog.squix.org/2016/01/esp8266-weather-station-world-clock-demo.html</link>
					<comments>https://blog.squix.org/2016/01/esp8266-weather-station-world-clock-demo.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Fri, 01 Jan 2016 15:19:00 +0000</pubDate>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[weather station]]></category>
		<category><![CDATA[World Clock]]></category>
		<guid isPermaLink="false">http://blog.squix.org/2016/01/01/esp8266-weather-station-world-clock-demo/</guid>

					<description><![CDATA[Just in time for the beginning of the new year I added a demo for the WeatherStation which displays various world times together with a pretty icon. Just update the WeatherStation library in your Arduino IDE to the latest version or download it manually from ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2016/01/esp8266-weather-station-world-clock-demo.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
Just in time for the beginning of the new year I added a demo for the WeatherStation which displays various world times together with a pretty icon. Just update the WeatherStation library in your Arduino IDE to the latest version or download it manually from here:&nbsp;<a href="https://github.com/squix78/esp8266-weather-station">https://github.com/squix78/esp8266-weather-station</a><br />
Then you can open the demo from File &gt; Examples &gt; ESP8266 Weather Station &gt; WorldClockDemo</p>
<p>The used icons are designed by Adam Whitcroft:&nbsp;<a href="http://adamwhitcroft.com/offscreen/">http://adamwhitcroft.com/offscreen/</a></p>
<p>Happy New Year!</p>
</div>
<p><iframe loading="lazy" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/OWm8wHwaubs" width="560"></iframe></div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2016/01/esp8266-weather-station-world-clock-demo.html/feed</wfw:commentRss>
			<slash:comments>13</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">14</post-id>	</item>
		<item>
		<title>ESP8266 Weather Station: Measuring Inside and Outside Temperature &#8211; Part 1</title>
		<link>https://blog.squix.org/2015/12/esp8266-weather-station-measuring-2.html</link>
					<comments>https://blog.squix.org/2015/12/esp8266-weather-station-measuring-2.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Mon, 28 Dec 2015 20:39:00 +0000</pubDate>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[ESP8266-projects]]></category>
		<category><![CDATA[DHT22]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[weather station]]></category>
		<guid isPermaLink="false">http://blog.squix.org/2015/12/28/esp8266-weather-station-measuring-2/</guid>

					<description><![CDATA[Measuring Inside and Outside Temperature &#8211; Part 2&#62; The code you get with the WeatherStation (https://github.com/squix78/esp8266-weather-station) is meant as a starting point for beginners and enthusiasts to display information. So far there are modules to get correct time from the internet as well as current ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2015/12/esp8266-weather-station-measuring-2.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;">
<div dir="ltr" style="text-align: left;"><a href="https://blog.squix.org/2016/01/esp8266-weather-station-measuring.html"><strong>Measuring Inside and Outside Temperature &#8211; Part 2&gt;</strong></a></div>
<div dir="ltr" style="text-align: left;"></div>
<div dir="ltr" style="text-align: left;">The code you get with the WeatherStation (<a href="https://github.com/squix78/esp8266-weather-station">https://github.com/squix78/esp8266-weather-station</a>) is meant as a starting point for beginners and enthusiasts to display information. So far there are modules to get correct time from the internet as well as current and future weather conditions. Now let&#8217;s get a bit more local.<br />
What if you wanted to measure and display information from various places in your house or apartment? This blog post shows you how to attach a DHT22 temperature/humidity sensor either directly to the WeatherStation (in case you want to measure it where the WeatherStation is) or how to collect and display data from another room over WiFi.</p>
<h3 style="text-align: left;">Requirements &amp; Preparation</h3>
<p>For this tutorial I assume that you already have a working WeatherStation and a DHT22 breakout board ready.</p>

<table id="tablepress-6" class="tablepress tablepress-id-6">
<thead>
<tr class="row-1">
	<td class="column-1"></td><th class="column-2">Product</th><th class="column-3">Where to buy?</th>
</tr>
</thead>
<tbody class="row-striping row-hover">
<tr class="row-2">
	<td class="column-1"><a href="/product/weatherstation-kit-w-white-oled"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/11/WeatherStationKit.jpg?resize=150%2C150&#038;ssl=1" alt="" width="150" height="150" class="aligncenter size-thumbnail wp-image-186" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/11/WeatherStationKit.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/11/WeatherStationKit.jpg?zoom=2&amp;resize=150%2C150&amp;ssl=1 300w" sizes="(max-width: 150px) 100vw, 150px" /></a></td><td class="column-2">The ESP8266 WeatherStation</td><td class="column-3"><a href="https://www.amazon.com/ESP8266-Starter-OLED-display-Arduino/dp/B01KE7BA3O/" target="_blank">Amazon (US)</a><br />
<a href="/product/weatherstation-kit-w-white-oled" target="_blank">Squix Shop (World wide)</a></td>
</tr>
<tr class="row-3">
	<td class="column-1"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/sku146979a.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/sku146979a.jpg?resize=150%2C150&#038;ssl=1" alt="" width="150" height="150" class="aligncenter size-thumbnail wp-image-1501" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/sku146979a.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/sku146979a.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/sku146979a.jpg?resize=180%2C180&amp;ssl=1 180w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/sku146979a.jpg?resize=200%2C200&amp;ssl=1 200w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/sku146979a.jpg?resize=450%2C450&amp;ssl=1 450w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/sku146979a.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/sku146979a.jpg?w=600&amp;ssl=1 600w" sizes="(max-width: 150px) 100vw, 150px" /></a></td><td class="column-2">DHT22 Humidity/ Temperature Sensor</td><td class="column-3"><a href="/go/banggood-dht22" target="_blank">Banggood</a></td>
</tr>
<tr class="row-4">
	<td class="column-1"><a href="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/1e311d7b-b4e9-6fde-db46-a9d746d77d98.jpg?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/1e311d7b-b4e9-6fde-db46-a9d746d77d98.jpg?resize=150%2C150&#038;ssl=1" alt="" width="150" height="150" class="aligncenter size-thumbnail wp-image-1415" srcset="https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/1e311d7b-b4e9-6fde-db46-a9d746d77d98.jpg?resize=150%2C150&amp;ssl=1 150w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/1e311d7b-b4e9-6fde-db46-a9d746d77d98.jpg?resize=300%2C300&amp;ssl=1 300w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/1e311d7b-b4e9-6fde-db46-a9d746d77d98.jpg?resize=180%2C180&amp;ssl=1 180w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/1e311d7b-b4e9-6fde-db46-a9d746d77d98.jpg?resize=120%2C120&amp;ssl=1 120w, https://i0.wp.com/blog.squix.org/wp-content/uploads/2016/12/1e311d7b-b4e9-6fde-db46-a9d746d77d98.jpg?w=600&amp;ssl=1 600w" sizes="(max-width: 150px) 100vw, 150px" /></a></td><td class="column-2">NodeMCU V1.0</td><td class="column-3"><a href="/go/banggood-nodemcu-cp2102" target="_blank">Banggood</a></td>
</tr>
</tbody>
</table>
<!-- #tablepress-6 from cache -->
<p>&nbsp;</p>
<h3 style="text-align: left;">Attaching the DHT22 to the ESP8266 directly to the WeatherStation</h3>
<div>To measure temperature and humidity in the room where you are running the WeatherStation you can attach the DHT22 breakout board as shown in the schema bellow</div>
<table class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="text-align: center;"><a style="margin-left: auto; margin-right: auto;" href="https://i0.wp.com/2.bp.blogspot.com/-JZyCdC-Z9MM/VoDe2TR6YXI/AAAAAAAAAg0/dbZHcrPpCi4/s1600/WeatherStationSketchWithDHT22_bb.png"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/12/WeatherStationSketchWithDHT22_bb.png?resize=253%2C320&#038;ssl=1" width="253" height="320" border="0" /></a></td>
</tr>
<tr>
<td class="tr-caption" style="text-align: center;">ESP8266 WeatherStation with locally attached<br />
DHT22 sensor to measure temperature and humidity</td>
</tr>
</tbody>
</table>
<p>Next you need to import the DHT22 library. This is easiest by using the library Manager:<b><br />
Sketch &gt; Include Library&#8230; &gt; Manage Libraries&#8230;</b></p>
<div>And now search for the DHT library:</div>
<div>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="https://i0.wp.com/4.bp.blogspot.com/-XDjogdqtOko/VoDhM4JZNbI/AAAAAAAAAhA/L7WGBtfGUPY/s1600/DHT22LibraryManager.png"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/12/DHT22LibraryManager.png?resize=320%2C179&#038;ssl=1" width="320" height="179" border="0" /></a></div>
<div></div>
<p>Now that you have the library you can start extending the demo. In order for this to work I assume that you have already done everything to get a working WeatherStation. Save your existing sketch under a new name. Here are the necessary changes:</p>
</div>
<div><script src="https://gist.github.com/squix78/ef342828908dad82feea.js"></script></div>
<div></div>
</div>
<p>&nbsp;</p>
<div>
<p>Let&#8217;s discuss the changes:</p>
<ul style="text-align: left;">
<li><b>Line 37</b>: I have added the DHT library</li>
<li><b>Lines 77-83</b>: configuration options for the DHT library. If you are using a DHT11 or DHT21 here you can change it. Also adapt the used pin. If you are not using the NodeMCU board D6 will give you a compile error</li>
<li><b>Lines 104/105</b>: two new variables for humidity and temperature. If this was a new WeatherStation module you would keep the variable in the new classes and not here, in a &#8220;global&#8221; scope&#8230;</li>
<li><strong>Lines 110-119</strong>: The prototypes help the compiler/linker to use functions which will only be used afterwards</li>
<li><b>Lines 119/124: </b>I added a new drawIndoor method and increased the number of frames to 6. Now the framework knows which method to call in order to draw the indoor information</li>
<li><b>Lines 231-233: </b>In this tutorial we update the temperature und humidity only once every 10 minutes. Updating the values only costs about 250ms but it might still be too much to do it in the hot (main) loop. But you could do it there every once in a while</li>
<li><b>Lines 271-277: </b>This draws the indoor frame. You might see a strong similarity to the drawThingspeak method. This is not coincidental since they draw similar data. In a perfect world we could extract this to an extra method to share the code</li>
</ul>
<div>[the_ad_placement id=&#8221;inpostplacement&#8221;]</div>
<div></div>
<div>That&#8217;s it! Apply these changes to your code, compile it and flash your ESP8266 with the changes after you set up the wiring.</div>
<div></div>
<table class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="text-align: center;"><a style="margin-left: auto; margin-right: auto;" href="https://i0.wp.com/4.bp.blogspot.com/-mOg5oJ7uaZM/VoGryzEnREI/AAAAAAAAAhQ/k85N6F-rdG8/s1600/WeatherStationDHT22.jpg"><img data-recalc-dims="1" loading="lazy" decoding="async" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/12/WeatherStationDHT22.jpg?resize=315%2C320&#038;ssl=1" width="315" height="320" border="0" /></a></td>
</tr>
<tr>
<td class="tr-caption" style="text-align: center;">The result of successfully following this tutorial</td>
</tr>
</tbody>
</table>
<div></div>
<div></div>
<div>Part two of this tutorial will show you how to read the information from another ESP8266 through the cloud&#8230;</div>
</div>
<div><strong><a href="https://blog.squix.org/2016/01/esp8266-weather-station-measuring.html">Measuring Inside and Outside Temperature &#8211; Part 2&gt;</a></strong></div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2015/12/esp8266-weather-station-measuring-2.html/feed</wfw:commentRss>
			<slash:comments>76</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">15</post-id>	</item>
	</channel>
</rss>
