<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://forum.robosavvy.com/feed.php?f=17&amp;t=6499" />

<title>RoboSavvy Forum</title>
<subtitle>Robosavvy Forum: The largest online community of Humanoid Robot Builders</subtitle>
<link href="http://forum.robosavvy.com/index.php" />
<updated>2010-08-16T10:35:34+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=17&amp;t=6499</id>
<entry>
<author><name><![CDATA[roboard]]></name></author>
<updated>2010-08-16T10:35:34+01:00</updated>
<published>2010-08-16T10:35:34+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=6499&amp;p=27881#p27881</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=6499&amp;p=27881#p27881"/>
<title type="html"><![CDATA[Re: using SRF05 with RoBoard]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=6499&amp;p=27881#p27881"><![CDATA[
For simplifying the usage and design of RoBoIO, rcservo_SendPWMPulses() and rcservo_Inp() cannot be used on the same channel at the same time.<br /><br />Capture Mode is dedicated to PWM-based RC servos (such as KONDO's and HiTEC's PWM servos), and may not fit your purpose.<br /><br />For your purpose, it is necessary to employ the low-level PWM lib and direct GPIO operations. You may refer to the source code of rcservo_ReadPosition_fast() in rcservo.cpp of RoBoIO src; it provides a similar implementation for you reference. <img src="http://forum.robosavvy.com/images/smilies/icon_smile.gif" alt=":)" title="Smile" /><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1542">roboard</a> — Mon Aug 16, 2010 10:35 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Marsman]]></name></author>
<updated>2010-08-16T05:33:41+01:00</updated>
<published>2010-08-16T05:33:41+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=6499&amp;p=27878#p27878</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=6499&amp;p=27878#p27878"/>
<title type="html"><![CDATA[using SRF05 with RoBoard]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=6499&amp;p=27878#p27878"><![CDATA[
Hi,<br /><br />I know, I should have bought the I2C version of the Ultra-Sonic sensors (SRF08 or SRF10) but I have not. The operation of the SRF05 (or SRF04) still is quite simple but I wonder which are the best library elements of the RB100 SW to use.<br /><br />I connect the Trigger Input / Echo Output of SRF05 (Mode 2 - single pin) to one of the PWM ports (her channel 10) and intend to use the rcservo.h library. A sequence similar to this should do:<br /><br />rcservo_Initialize(RCSERVO_USECHANNEL10);<br />rcservo_EnterPWMMode();<br />rcservo_SendPWMPulses(10, 15L, 14L, 1): // send 1 pulse of 15us to SRF05<br />while (!rcservo_IsPWMCompleted(10)); // wait until finished<br />while (in_value = rcservo_Inp(10) = 0);  // check for rising edge of return signal<br />t1 = localtime(&amp;tv.tv_sec); // will build a function to get system time in micro-seconds<br />while (in_value = rcservo_Inp(10) = 1);  // check for falling edge of return signal<br />t2 = localtime(&amp;tv.tv_sec); // will build a function to get system time in micro-seconds<br /><br />pulse_length = t2 - t1; // return signal length in micro-seconds<br /><br /><br />Would you please comment if that would work with enough accuracy to determine the object's distance? To improve statistics I could put the measurement into a loop to repeat say 10 times.<br /><br />I wonder if any of the servo commands in &quot;Capture Mode&quot; could be used to determine the return signal's pulse length?<br /><br />Best regards,<br /><br />Marsman<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1699">Marsman</a> — Mon Aug 16, 2010 5:33 am</p><hr />
]]></content>
</entry>
</feed>