<div dir="ltr">That helped a bit thanks!<div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><br><div><div><br></div><div><div>--</div><div>Darcy Whyte</div><div><br></div><div>Art+ <a href="http://inventorartist.com/" target="_blank">inventorArtist.com</a> | Aviation <a href="http://rubber-power.com/" target="_blank">rubber-power.com</a></div>

<div>Contact: <a href="mailto:darcy@inventorArtist.com" target="_blank">darcy@inventorArtist.com</a> | 613-563-3634 by appointment (no text)</div></div></div><div><br></div></div></div>
<br><br><div class="gmail_quote">On Wed, Feb 5, 2014 at 2:34 PM, j ross <span dir="ltr"><<a href="mailto:waterfallclose@gmail.com" target="_blank">waterfallclose@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Some thoughts:<div>1) Increase timeout value</div><div>The input loop runs at the rate of the DigitalRead() but the timeout is reached based on the number of iterations of the loop, not a fixed time.  Try increasing the SDM_IO_TIMEOUT to something bigger like 10000.</div>


<div><br></div><div>2) Increase pulse length</div><div>The longer the pulse, the more energy you put into the air.  Ultrasonic frequencies get attenuated quickly in air so power is important to range. Try a pulse length of 50us instead of 10.<br>


<div><br></div></div><div>Hope that helps!</div><div>Jeff</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Wed, Feb 5, 2014 at 2:02 PM, Darcy Whyte <span dir="ltr"><<a href="mailto:darcy@inventorartist.com" target="_blank">darcy@inventorartist.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi, I have one of these (I think) <a href="http://ramshackblog.blogspot.ca/2012/02/ultrasonic-range-finder-using-sdm-io.html" target="_blank">http://ramshackblog.blogspot.ca/2012/02/ultrasonic-range-finder-using-sdm-io.html</a><div>




<br></div><div>It has four pins.</div><div><br></div><div>I've got it working using the code at that page. It measures really well up to about 30cm then after that it just prints out 999 cm?</div><div><br></div><div>



I noticed with a piece of paper I can get further (around 70cm). </div>
<div><br></div><div>It's supposed to be good for 150cm. </div><div><br></div><div>Any ideas what's going on here?</div><div><br></div><div>I have two of them and I tried the other one (in case it was a bu component). But same result...</div>




<div><div dir="ltr"><br><div><div><br></div><div><div>--</div><div>Darcy Whyte</div><div><br></div><div>Art+ <a href="http://inventorartist.com/" target="_blank">inventorArtist.com</a> | Aviation <a href="http://rubber-power.com/" target="_blank">rubber-power.com</a></div>




<div>Contact: <a href="mailto:darcy@inventorArtist.com" target="_blank">darcy@inventorArtist.com</a> | <a href="tel:613-563-3634" value="+16135633634" target="_blank">613-563-3634</a> by appointment (no text)</div></div>


</div><div><br></div></div></div>
</div>
<br></div></div>_______________________________________________<br>
Lab mailing list<br>
1. subscribe <a href="http://artengine.ca/mailman/listinfo/lab" target="_blank">http://artengine.ca/mailman/listinfo/lab</a><br>
2. then email <a href="mailto:Lab@artengine.ca" target="_blank">Lab@artengine.ca</a> to send your message to the list<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Lab mailing list<br>
1. subscribe <a href="http://artengine.ca/mailman/listinfo/lab" target="_blank">http://artengine.ca/mailman/listinfo/lab</a><br>
2. then email <a href="mailto:Lab@artengine.ca">Lab@artengine.ca</a> to send your message to the list<br></blockquote></div><br></div>