<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Old meets new, the 1-Wire Weather Station on the SPARK Core. (part 5)</title><link>/technologies/internet-of-things/b/blog/posts/old-meets-new-the-1-wire-weather-station-on-the-spark-core-part-5</link><description>In my previous blog posts I mainly focused on the IoT aspects of the project. In Old meets new, the 1-Wire Weather Station on the SPARK Core. (part 2) I showed a scan of the 1-Wire bus, which showed the devices in the 1-Wire Weather Station. In the l</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Old meets new, the 1-Wire Weather Station on the SPARK Core. (part 5)</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/old-meets-new-the-1-wire-weather-station-on-the-spark-core-part-5</link><pubDate>Thu, 16 Jan 2020 21:14:23 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9c3f7f5b-75f1-4659-8660-0d9e4772e989</guid><dc:creator>nikaoj</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi Gerrit,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;excellent post! I have found my 17 year old weather station, (never used), and after reading your blog I decided to give it a try and connect with Arduino and existing libraries. It works!!!!!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Temperature sensor, wind direction, and activation of the DS2407 switch working with existing libraries.&lt;/p&gt;&lt;p&gt;But when I try to read DS2401 to capture wind direction I have not been able to read anything. Somehow I think it is linked with the switch. I have tried on and off with switch activation but result are the same. I have arrived to a dead end. Any ideas on what to try next? Thanks for your help. I put the last code I try&lt;/p&gt;&lt;p&gt;#define DEBUG&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;#include &amp;lt;OneWire.h&amp;gt;&lt;/p&gt;&lt;p&gt;#include &amp;lt;DS2401.h&amp;gt;&lt;/p&gt;&lt;p&gt;#include &amp;lt;DS2406.h&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;OneWire oneWire(10);&lt;/p&gt;&lt;p&gt;DS2401 ds24(&amp;amp;oneWire);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;OneWireSwitch osw(&amp;amp;oneWire,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Specify the serial number of your DS2407 here.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (uint8_t[]){18, 191, 173, 13, 0, 0, 0, 224});&lt;/p&gt;&lt;p&gt;void setup() {&lt;/p&gt;&lt;p&gt;&amp;nbsp; Serial.begin(9600);&lt;/p&gt;&lt;p&gt;&amp;nbsp; delay(10);&lt;/p&gt;&lt;p&gt;&amp;nbsp; Serial.println(&amp;quot;DEBUG:&amp;quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; if (ds24.init())&lt;/p&gt;&lt;p&gt;&amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #ifdef DEBUG&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.println(F(&amp;quot;Found OneWire Device&amp;quot;));&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif // DEBUG&lt;/p&gt;&lt;p&gt;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; else&lt;/p&gt;&lt;p&gt;&amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #ifdef DEBUG&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.println(F(&amp;quot;ERROR: No OneWire Device Found&amp;quot;));&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif // DEBUG&lt;/p&gt;&lt;p&gt;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; if (ds24.isDS2401())&lt;/p&gt;&lt;p&gt;&amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #ifdef DEBUG&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.println(F(&amp;quot;IS DS2401&amp;quot;));&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif // DEBUG&lt;/p&gt;&lt;p&gt;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; else&lt;/p&gt;&lt;p&gt;&amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #ifdef DEBUG&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.println(F(&amp;quot;ERROR: Is Not DS2401&amp;quot;));&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif // DEBUG&lt;/p&gt;&lt;p&gt;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;void loop() {&lt;/p&gt;&lt;p&gt;&amp;nbsp; bool status;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Turn on the switch.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oneWire.reset(); &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; osw.setSwitchState(false);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; status=osw.getSwitchState();&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.print(status);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.println(&amp;quot;&amp;quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(2000);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oneWire.reset(); &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay(2000);&lt;/p&gt;&lt;p&gt;&amp;nbsp; Serial.println(ds24.GetSerial());&lt;/p&gt;&lt;p&gt;&amp;nbsp; delay(2000);&lt;/p&gt;&lt;p&gt;&amp;nbsp; ds24.Refresh();&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19633&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Old meets new, the 1-Wire Weather Station on the SPARK Core. (part 5)</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/old-meets-new-the-1-wire-weather-station-on-the-spark-core-part-5</link><pubDate>Sun, 21 Aug 2016 20:44:10 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9c3f7f5b-75f1-4659-8660-0d9e4772e989</guid><dc:creator>Former Member</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;For anyone interested in producing their own software to monitor MicroLans (multiple 1-Wire chips on a common pair of wires)... it can be done with Lazarus (the &amp;quot;free Delphi&amp;quot;) and a simple USB adapter ($25) on a Windows PC... I know... and I suspect (can anyone confirm?) on a Linux box with Lazarus, too... one of the attractions of Linux!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Details at...&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="http://sheepdogguides.com/lut/dstl2hello_ds18b20.htm" rel="nofollow ugc noopener" target="_blank" title="http://sheepdogguides.com/lut/dstl2hello_ds18b20.htm"&gt;http://sheepdogguides.com/lut/dstl2hello_ds18b20.htm&lt;/a&gt; &lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19633&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Old meets new, the 1-Wire Weather Station on the SPARK Core. (part 5)</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/old-meets-new-the-1-wire-weather-station-on-the-spark-core-part-5</link><pubDate>Mon, 28 Dec 2015 14:03:43 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9c3f7f5b-75f1-4659-8660-0d9e4772e989</guid><dc:creator>Former Member</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi Gerrit,&lt;/p&gt;&lt;p&gt;The article made me look to my 1-Wire weather station again, it was on a shelf for many years. I&amp;#39;m currently trying to get the code running, upto part4 everything works, the final integration of the weatherstation in part5 is not working for me. Do you have a link to the code somewhere for me ? I really would be happy in getting this going again.&lt;/p&gt;&lt;p&gt;I considered the TINI 15 years ago and never got to it, these days I have lot&amp;#39;s of fun with the Sparks and Photon.&lt;/p&gt;&lt;p&gt;So if you could help me out it would really be appreciated.&lt;/p&gt;&lt;p&gt;KR,Rudy&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19633&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Old meets new, the 1-Wire Weather Station on the SPARK Core. (part 5)</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/old-meets-new-the-1-wire-weather-station-on-the-spark-core-part-5</link><pubDate>Fri, 09 Jan 2015 11:39:43 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9c3f7f5b-75f1-4659-8660-0d9e4772e989</guid><dc:creator>gadget.iom</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Looks very good! &lt;/p&gt;&lt;p&gt;Interested to see how it develops. &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-9c3f7f5b-75f1-4659-8660-0d9e4772e989/contentimage_5F00_1.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19633&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Old meets new, the 1-Wire Weather Station on the SPARK Core. (part 5)</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/old-meets-new-the-1-wire-weather-station-on-the-spark-core-part-5</link><pubDate>Thu, 08 Jan 2015 19:45:57 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:9c3f7f5b-75f1-4659-8660-0d9e4772e989</guid><dc:creator>DAB</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I like the simple design.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I remember I got a similar weather kit about 45 years ago that also used mechanical switches to determine the same parameters.&lt;/p&gt;&lt;p&gt;It will be interesting to see if you get any switch bounce from your reed sensors.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Cool project.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=19633&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>