<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 14, 2013 at 6:28 PM, James Brown <span dir="ltr"><<a href="mailto:james.brown4994@gmail.com" target="_blank">james.brown4994@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple"><p class=""><br>
</p><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">I get frustrated with the upload process. Various errors I can’t fathom out about not finding files, not in sync. In the end I usually end up having to restart the pc and that solves it. Would be nice to understand what is going on there.</span></p>
</div></blockquote><div><br></div><div style>We do need to update avrdude, which might help. In the meantime, however, you might do the following:</div><div style><br></div><div style>1. Press "Upload" (or whatever icon we use)</div>
<div style>2. Hit reset on your board just before the upload.</div><div style>3. Profit!</div><div style><br></div><div style>When dealing with serial, I find that sometimes the Arduino misses things, because it comes to life and starts doing things with the serial port. Resetting the PC... well, I use a Mac, so I face different issues at different times.</div>
<div> </div><div style>Underneath, we're using the same tools as the Arduino IDE, so there shouldn't be anything too special/different there. At some point, let us know what those errors are specifically, in case there's anything we can do.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple">
<p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p><p class=""><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt">Also if anyone can tell me why my pc insists on allocating COM7 and COM8 for my 2 arduino boards. As far as I can see I am not using any of the lower number ports. Not that important I suppose but would be great to understand these things better as helps troubleshooting.</span><br>
</p></div></blockquote><div><br></div><div style>Windows does not like you. (Read: I have no idea.)</div><div> <span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"> </span></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div lang="EN-GB" link="blue" vlink="purple"><p class=""><span style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Finally, yes you are right I am inquisitive I have now found those libraries. Thanks for that. I promise to keep my nose out! Seriously though, it is nice to see how things work. Again helps troubleshooting possibly.</span></p>
</div></blockquote><div><br></div><div>:)</div><div style><br></div><div style>I was kidding about not reading in. You're welcome to ask any and all questions about what you find. It is certainly the case that we might be able to usefully expose more in Plumbing... that I don't doubt. That said, because of how occam #includes work, our "libraries" are not really "blessed" entities. For example, you could start working on "libjames.module", put it in the same directory as your code, and do</div>
<div style><br></div><div style>#include "libjames.module"</div><div style><br></div><div style>and it will be pulled in. Further, the include is the same as copy-pasting the code into the file it is being sourced from. So, really, all of the code in the "library" folder is only special because someone other than you wrote it. (If that makes it special.)</div>
<div><br></div><div><br></div><div style>W.R.T. your code:</div><div style><br></div><div style>If you are actually using a PIR module, you might also look at</div><div style><br></div><div style><a href="https://github.com/jadudm/Paper-ES-Sensor">https://github.com/jadudm/Paper-ES-Sensor</a><br>
</div><div style><br></div><div style>where I use the Modern Device PIR sensor. In that context, I think I was using it in an interrupt-driven mode. </div><div style><br></div><div style><a href="https://github.com/jadudm/Paper-ES-Sensor/blob/master/pir.module">https://github.com/jadudm/Paper-ES-Sensor/blob/master/pir.module</a><br>
</div><div style><br></div><div style>and</div><div style><br></div><div style><a href="https://github.com/jadudm/Paper-ES-Sensor/blob/master/just-pir.occ">https://github.com/jadudm/Paper-ES-Sensor/blob/master/just-pir.occ</a><br>
</div><div style><br></div><div style>might be of interest.</div><div style><br></div><div style>Or, if I'm completely wrong, nevermind. :)</div><div style><br></div><div style>Cheers,</div><div style>M</div></div></div>
</div>