<?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>Blog - All Comments</title><link>/challenges-projects/project14/goinggreen/b/blog</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: IOT Irrigation valve</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/iot-irrigation-valve</link><pubDate>Sat, 19 Aug 2017 14:30:11 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:194a2701-173d-412e-b548-4d5e4d2dd978</guid><dc:creator>sanketbojewar12</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Superbly done mate.&lt;/p&gt;&lt;p&gt;Appreciated.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3334&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Chicken Coop Livestream</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/chicken-coop-livestream</link><pubDate>Tue, 15 Aug 2017 18:57:02 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cc3c6945-d0c6-49f3-ac55-dfaae09ce800</guid><dc:creator>idanre1</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Great project!&lt;/p&gt;&lt;p&gt;I actually Interested doing such a thing in my roof.&lt;/p&gt;&lt;p&gt;I suffer from pigeons and I want to monitor the roof and using some computer vision - motion detector, know when they party in my roof.&lt;/p&gt;&lt;p&gt;And when they come - auto open a water hose to scare them out to someplace else.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;+1&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Idan&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3371&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Garden Watering Project: getting started (finally!)</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/garden-watering-project-getting-started-finally</link><pubDate>Sun, 13 Aug 2017 07:50:12 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:fa5b7004-3911-4b48-b125-1a8d310c401e</guid><dc:creator>fariez97</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;can I have full codes and circuit of this project?????........I very interested of this project to do my FYP&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3423&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Garden Watering Project: getting started (finally!)</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/garden-watering-project-getting-started-finally</link><pubDate>Fri, 11 Aug 2017 12:53:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:fa5b7004-3911-4b48-b125-1a8d310c401e</guid><dc:creator>gecoz</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi Clinton,&lt;/p&gt;&lt;p&gt;Having 2 kids myself, I do sympathise with you! The good news is that getting started with a project is usually the biggest hurdle, and you are over it now! &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-fa5b7004-3911-4b48-b125-1a8d310c401e/contentimage_5F00_1.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;About the concept of &amp;quot;returning something&amp;quot;, I take the context is coding. I will try and answer your questions the best I can, but I apologise in advance for taking the &amp;quot;long route&amp;quot; for my expalnation, and for repeating things you probably already know along the way.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Arduino programs are basically written using the &amp;quot;&lt;strong&gt;C&lt;/strong&gt;&amp;quot; programming language (you can use &amp;quot;&lt;strong&gt;C++&lt;/strong&gt;&amp;quot; as well, but lets focus on &lt;strong&gt;C&lt;/strong&gt; for the time being). This language allows you to describe your program using what is known as functional programming paradigm: when you want your program to do something, to make the programming easier, you can break the overall task into smaller actions, executed in a defined sequence. Each action thus is fullfilling a logically cohesive &amp;quot;&lt;em&gt;function&lt;/em&gt;&amp;quot;, sometimes generating a result for such processing. Your main program defines the logic (and order) for the execution of the functions (i.e. the main program is &amp;quot;&lt;em&gt;calling&lt;/em&gt;&amp;quot; the functions), and gets back the results of the functions&amp;#39; processing (i.e. the something &amp;quot;&lt;em&gt;returned&lt;/em&gt;&amp;quot; by each function). The function&amp;#39;s code will have a &amp;quot;&lt;strong&gt;return&lt;/strong&gt;&amp;quot; statement, which tells you exactly what is passed back to the main program by the function when it finishes its processing (i.e. upon &amp;quot;&lt;em&gt;exiting&lt;/em&gt;&amp;quot;).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;To make the coding job easier, people have written and organised function into &amp;quot;&lt;em&gt;libraries&lt;/em&gt;&amp;quot; (they are the equivalent of COTS, applied to the software world). Usually, each library tries to deal and solve one specific problem: the Timer library for Arduino you mention, for instance, deals with the timing problem, and offers some functions to make the use of timing easier for you. This library is written in &lt;strong&gt;C++&lt;/strong&gt;. The reason I mention this is because this language adds another powerful programming paradigm: object oriented programming, and many libraries are written in &lt;strong&gt;C++&lt;/strong&gt;. You don&amp;#39;t need to worry about it at this time, the only thing to remember is that &lt;strong&gt;C++&lt;/strong&gt; will define &amp;quot;&lt;em&gt;objects&lt;/em&gt;&amp;quot;, and objects will have functions and the functions will need to be &amp;quot;&lt;em&gt;called&lt;/em&gt;&amp;quot; on those objects (the functions of an object are known as &amp;quot;&lt;em&gt;methods&lt;/em&gt;&amp;quot;). Therefore, to use a function, you first need to create the object that &amp;quot;owns&amp;quot; the method, then you can call the method using the &amp;quot;&lt;em&gt;dot&lt;/em&gt;&amp;quot; notation (the famous &amp;quot;&lt;strong&gt;t.update()&lt;/strong&gt;&amp;quot; for example is calling the &lt;strong&gt;update()&lt;/strong&gt; method on the &lt;strong&gt;t&lt;/strong&gt; object).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now, the idea behind the Timer library is that you can define the timing events you are interested in using by calling the appropriate Timer object method. The list of methods can be found in the Timer.h file. Lets use the &lt;a class="jive-link-external-small" href="https://github.com/JChristensen/Timer/tree/master/examples/blink2" rel="nofollow ugc noopener" target="_blank" title="https://github.com/JChristensen/Timer/tree/master/examples/blink2"&gt;blink2&lt;/a&gt; example from the library source code to try and understand who does what:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=%2F%2FFlash+two+LEDs+at+different+rates+using+Simon+Monk%27s+Timer+library%0A%2F%2Fhttp%3A%2F%2Fwww.doctormonk.com%2F2012%2F01%2Farduino-timer-library.html%0A%2F%2F%0A%2F%2FJack+Christensen+30Sep2013%0A%2F%2F%0A%2F%2FBeerware+license%3A+Free+for+any+and+all+purposes%2C+but+if+you+find+it%0A%2F%2Fuseful+AND+we+actually+meet+someday%2C+you+can+buy+me+a+beer%21%0A%0A%23include+%22Timer.h%22+%2F%2Fhttp%3A%2F%2Fgithub.com%2FJChristensen%2FTimer%0A%0Aconst+int+LED1+%3D+8%3B+%2F%2Fconnect+one+LED+to+this+pin+%28with+appropriate+current-limiting+resistor+of+course%29%0Aconst+int+LED2+%3D+9%3B+%2F%2Fconnect+another+LED+to+this+pin+%28don%27t+forget+the+resistor%29%0Aconst+unsigned+long+PERIOD1+%3D+1000%3B+%2F%2Fone+second%0Aconst+unsigned+long+PERIOD2+%3D+10000%3B+%2F%2Ften+seconds%0ATimer+t%3B+%2F%2Finstantiate+the+timer+object%0A%0Avoid+setup%28void%29%0A%7B%0A++pinMode%28LED1%2C+OUTPUT%29%3B%0A++pinMode%28LED2%2C+OUTPUT%29%3B%0A++t.oscillate%28LED1%2C+PERIOD1%2C+HIGH%29%3B%0A++t.oscillate%28LED2%2C+PERIOD2%2C+HIGH%29%3B%0A%7D%0A%0Avoid+loop%28void%29%0A%7B%0A++t.update%28%29%3B%0A%7D]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;First of all, this example will make 2 led blink at different intervals: led 1 will periodically switch on for 1 second then off&amp;nbsp; for 1 second, led 2 will do the same , but with a period of 10 seconds instead. Lets focus on the use of the Timer library.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The Timer object &amp;quot;&lt;strong&gt;t&lt;/strong&gt;&amp;quot; is created at line 15. In the&lt;strong&gt; setup()&lt;/strong&gt; function. The timer is initialized by defining the 2 events it will have to manage. This is done at line 21 and 22, where the calls &amp;quot;&lt;strong&gt;t.oscillate(...)&lt;/strong&gt;&amp;quot; basically instruct the timer to create 2 events. The &amp;quot;&lt;strong&gt;oscillate&lt;/strong&gt;&amp;quot; method is basically a periodic binary switch, where you can define the output that is switched (LED1 and LED2), how long the period each state of the switch needs to be kept on for (PERIOD1 and PERIOD2) and the initial state of the switch (HIGH for both).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;As said, those 2 lines only setup the events, but they don&amp;#39;t actually start the switching. That actually happens in the &lt;strong&gt;loop()&lt;/strong&gt; cycle. This is where the &amp;quot;&lt;strong&gt;t.update()&lt;/strong&gt;&amp;quot; comes into play.&lt;/p&gt;&lt;p&gt;Atline 27, the call to the &lt;strong&gt;update(...)&lt;/strong&gt; method will cause the timer object to go through all the events setup (in our case, the 2 events setup before), and for each event, check if the defined period has lapsed, and if so cause the output to switch state (i.e. switch the leds or on off according to the time lapsed).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This cycle will go on indefinitely, as the call to update is in the&lt;strong&gt; loop()&lt;/strong&gt; function.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;One final note about the Timer library: the number of events it can handle is limited to 10, so if for your project you need more than 10 events for your timing, this library will not be suitable.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;i hope this helps.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Looking forward to see how your project will progress. &lt;span&gt;[View:/resized-image/__size/16x16/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-fa5b7004-3911-4b48-b125-1a8d310c401e/contentimage_5F00_1.png:16:16]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Fabio.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;P.S: As for the &amp;quot;ID&amp;quot; question, it depends on the context where you found it used. Typically I&amp;#39;d use ID to assign a unique (and immutable) identifier to a device...&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3423&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IOT Irrigation valve</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/iot-irrigation-valve</link><pubDate>Thu, 10 Aug 2017 09:54:12 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:194a2701-173d-412e-b548-4d5e4d2dd978</guid><dc:creator>gecoz</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi Idan, &lt;/p&gt;&lt;p&gt;Thanks for sharing this project. Nicely done!&lt;/p&gt;&lt;p&gt;Fabio.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;P.S: Thanks for the mention, much appreciated.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3334&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: IOT Irrigation valve</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/iot-irrigation-valve</link><pubDate>Thu, 10 Aug 2017 05:56:49 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:194a2701-173d-412e-b548-4d5e4d2dd978</guid><dc:creator>jw0752</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi Idan,&lt;/p&gt;&lt;p&gt;Thanks for the great post and inspiring project. &lt;/p&gt;&lt;p&gt;John&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3334&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Chicken Coop Livestream</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/chicken-coop-livestream</link><pubDate>Fri, 04 Aug 2017 10:57:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cc3c6945-d0c6-49f3-ac55-dfaae09ce800</guid><dc:creator>mcb1</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hadley wrote this (some time ago now)&lt;/p&gt;&lt;p&gt;It&amp;#39;s a pretty general calculation using realistic figures.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="https://nicegear.co.nz/blog/what-size-solar-panel-and-battery-do-i-need/" rel="nofollow ugc noopener" target="_blank" title="https://nicegear.co.nz/blog/what-size-solar-panel-and-battery-do-i-need/"&gt;https://nicegear.co.nz/blog/what-size-solar-panel-and-battery-do-i-need/&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Normally liquid batteries need 140% input. Not sure if it is the same for all the Li-xx batteries or not.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Mark&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3371&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Chicken Coop Livestream</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/chicken-coop-livestream</link><pubDate>Mon, 31 Jul 2017 18:38:56 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cc3c6945-d0c6-49f3-ac55-dfaae09ce800</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;You could use this same setup in a number of nocturnal animal monitoring projects.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Well done.&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=3371&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Chicken Coop Livestream</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/chicken-coop-livestream</link><pubDate>Mon, 31 Jul 2017 08:24:11 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cc3c6945-d0c6-49f3-ac55-dfaae09ce800</guid><dc:creator>e14phil</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Can you advise on power consumption, what is your solar set up and what is the overall draw of the pi? &lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3371&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Chicken Coop Livestream</title><link>https://community.element14.com/challenges-projects/project14/goinggreen/b/blog/posts/chicken-coop-livestream</link><pubDate>Mon, 31 Jul 2017 08:18:30 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cc3c6945-d0c6-49f3-ac55-dfaae09ce800</guid><dc:creator>e14phil</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span&gt;[mention:ca2fe37c8c70477fb45e83ddaf152e5d:e9ed411860ed4f2ba0265705b8793d05]&lt;/span&gt;, What great timing! I was JUST about to begin build of a solar powered IR motion cam. My parents have a hedgehog house in their back garden and were looking to monitor it. You have done all the leg work for me haha!&amp;nbsp; Thank you. &lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=3371&amp;AppID=172&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>