<?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=4&amp;t=166" />

<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>2006-05-08T12:32:57+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=4&amp;t=166</id>
<entry>
<author><name><![CDATA[Pev]]></name></author>
<updated>2006-05-08T12:32:57+01:00</updated>
<published>2006-05-08T12:32:57+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1401#p1401</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1401#p1401"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1401#p1401"><![CDATA[
Excellent -<br /><br /> have you put some sort of sensor onto your servo? Do you plan too?<br /><br />Would love to see what your new Head for RN1 looks like<br /><br />Pev<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=88">Pev</a> — Mon May 08, 2006 12:32 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[H3dude]]></name></author>
<updated>2006-05-08T07:03:56+01:00</updated>
<published>2006-05-08T07:03:56+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1400#p1400</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1400#p1400"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1400#p1400"><![CDATA[
I got it working, thanks so much. It was the Delay command, just like you pointed out.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=142">H3dude</a> — Mon May 08, 2006 7:03 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[H3dude]]></name></author>
<updated>2006-05-05T17:56:32+01:00</updated>
<published>2006-05-05T17:56:32+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1392#p1392</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1392#p1392"/>
<title type="html"><![CDATA[Re: Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1392#p1392"><![CDATA[
<blockquote><div><cite>Pev wrote:</cite><br />Looking at your code you have the additional servo plugged into port 11, but your not calling your head_turn_no routine in the code snippet you have posted.<br /></div></blockquote><br /><br />I am calling it from a remocon button press, I just didn't include it in my post. <br /><br />The DELAY command however, is most likely the solution as I'm using the same servo (s3004) as you. I'll try that now. Thanks for your help!<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=142">H3dude</a> — Fri May 05, 2006 5:56 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Pev]]></name></author>
<updated>2006-05-05T07:29:38+01:00</updated>
<published>2006-05-05T07:29:38+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1386#p1386</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1386#p1386"/>
<title type="html"><![CDATA[Re: Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1386#p1386"><![CDATA[
<blockquote><div><cite>H3dude wrote:</cite><br /><blockquote><div><cite>Pev wrote:</cite>The servo is attached to port 9 and accessed using the servo command, format SERVO 9, {degree} where {degree} is a value from 10 to 190.<br /></div></blockquote><br /><br />Pev, this syntax doesn't seem to do anything in my standard pose block nor in my zero settings:<br /><br /><span style="font-size: 75%; line-height: 116%;">standard_pose:<br />SERVO 11, 98<br />MOVE G6A, 100,  76, 145,  93, 100, 100 <br />MOVE G6D, 100,  76, 145,  93, 100, 100  <br />MOVE G6B, 100,  30,  80, 100, 100, 100<br />MOVE G6C, 100,  30,  80, 100, 100, 100<br />WAIT<br />RETURN</span><br /><br />I also tried a simple move<br /><br /><span style="font-size: 75%; line-height: 116%;">head_turn_no:<br />SPEED 5<br />SERVO 11,98<br />SERVO 11,30<br />SERVO 11,160<br />SERVO 11,98<br />GOSUB standard_pose<br />RETURN</span><br /><br />alas, again I am clueless. Any ideas?</div></blockquote><br /><br />Hi,<br /><br />Looking at your code you have the additional servo plugged into port 11, but your not calling your head_turn_no routine in the code snippet you have posted. If you want him to turn his head every time he enters standard pose I'd go for something like this:<br /><br />standard_pose:<br />SERVO 11, 98<br />MOVE G6A, 100,  76, 145,  93, 100, 100 <br />MOVE G6D, 100,  76, 145,  93, 100, 100  <br />MOVE G6B, 100,  30,  80, 100, 100, 100<br />MOVE G6C, 100,  30,  80, 100, 100, 100<br />WAIT<br />GOSUB head_turn_no<br />RETURN<br /><br />head_turn_no:<br />SPEED 5<br />SERVO 11,98<br />deley 500<br />SERVO 11,30<br />delay 500<br />SERVO 11,160<br />delay 1000<br />SERVO 11,98<br />delay 500<br />RETURN<br /><br />I've added the delays just to ensure that servo has time to move. I was using a standard non-digital non feedback servo so if I wasn't careful the servo didn't move as it never had time to.<br /><br />Hope this makes sense <br /><br />Pev<br /><br />PS - if it helps when I was using the sharp IR sensor attached to AD port  1 I used the following code to move the head servo and check the sensor:<br /><br />SERVO 9, 30 'move head servo to left position<br />DELAY 3000<br />LEFT = AD(1)'Read Sonar on Sonar Port 5<br /><br />'Check Right<br />SERVO 9, 190  'move head servo to right position<br />DELAY 4000<br />RIGHT = AD(1)<br /><br />SERVO 9, 108 'move head to center position<br />DELAY 1000<br /><br />So he looked left and checked the sesor then looked right and checked the sensor.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=88">Pev</a> — Fri May 05, 2006 7:29 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[H3dude]]></name></author>
<updated>2006-05-04T10:46:10+01:00</updated>
<published>2006-05-04T10:46:10+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1383#p1383</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1383#p1383"/>
<title type="html"><![CDATA[Re: Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=1383#p1383"><![CDATA[
<blockquote><div><cite>Pev wrote:</cite><br />The servo is attached to port 9 and accessed using the servo command, format SERVO 9, {degree} where {degree} is a value from 10 to 190.<br /></div></blockquote><br /><br />Pev, this syntax doesn't seem to do anything in my standard pose block nor in my zero settings:<br /><br /><span style="font-size: 75%; line-height: 116%;">standard_pose:<br />SERVO 11, 98<br />MOVE G6A, 100,  76, 145,  93, 100, 100 <br />MOVE G6D, 100,  76, 145,  93, 100, 100  <br />MOVE G6B, 100,  30,  80, 100, 100, 100<br />MOVE G6C, 100,  30,  80, 100, 100, 100<br />WAIT<br />RETURN</span><br /><br />I also tried a simple move<br /><br /><span style="font-size: 75%; line-height: 116%;">head_turn_no:<br />SPEED 5<br />SERVO 11,98<br />SERVO 11,30<br />SERVO 11,160<br />SERVO 11,98<br />GOSUB standard_pose<br />RETURN</span><br /><br />alas, again I am clueless. Any ideas?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=142">H3dude</a> — Thu May 04, 2006 10:46 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ucrobots]]></name></author>
<updated>2006-03-26T19:06:05+01:00</updated>
<published>2006-03-26T19:06:05+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=790#p790</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=790#p790"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=790#p790"><![CDATA[
With the following source code the sonar is working, and printing is also possible.<br /><br />But the measured distance isn't correct. <br /><br />I think the sonar() command is only working if the echoline is high when (before) sonar() is executed.<br /><br />For details have look on <!-- m --><a class="postlink" href="http://robosavvy.com/Builders/ucrobots/">http://robosavvy.com/Builders/ucrobots/</a><!-- m --> <br />file: srf04-diagnostic.doc <br /><br /><br />================================ <br />dim a as integer <br />LCDINIT<br /><br />main:<br />a = sonar(5)  <br />a = sonar(5)  <br />delay 100 <br /><br />if a=0 then goto main<br /><br />print "SONAR(5): "<br />print format(a, dec)<br />print 10, 13<br /><br />goto main<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=107">ucrobots</a> — Sun Mar 26, 2006 7:06 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ucrobots]]></name></author>
<updated>2006-03-25T22:24:17+01:00</updated>
<published>2006-03-25T22:24:17+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=784#p784</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=784#p784"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=784#p784"><![CDATA[
I tried the source code below.<br />With this code the sonar is working and the LED is blinking.<br /><br />But the measured distance isn't correct.<br /><br /><span style="font-weight: bold">delay a</span> takes about 700ms, this means a=700 and distance = 700mm.<br />But the real distance was about 190cm.<br /><br />For details have look on <!-- m --><a class="postlink" href="http://robosavvy.com/Builders/ucrobots/">http://robosavvy.com/Builders/ucrobots/</a><!-- m --><br />file: srf04-diagnostic.doc<br /><br /><br />================================ <br />dim a as integer <br /><br />10: <br /><br />a = sonar(5) <br />out 52,0 <br />out 9,0 <br />delay a <br /><br />a = sonar(5) <br />out 52,1 <br />out 9,1 <br /><span style="font-weight: bold">delay a </span><br />goto 10 <br /><br />'===================================<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=107">ucrobots</a> — Sat Mar 25, 2006 10:24 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ucrobots]]></name></author>
<updated>2006-03-25T22:39:33+01:00</updated>
<published>2006-03-25T16:20:50+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=781#p781</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=781#p781"/>
<title type="html"><![CDATA[Testing SRF04]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=781#p781"><![CDATA[
Today I found this message on the Hitec support page :<br /><br />Please check the trigger and echo pins are connected correctly.<br />If it is connected to port combination 0, as manual describes, then <br />with the following source code, you can check if sonar does the job. <br />In case it works, then head LED will blink. <br /><br />'================================<br /><br />dim a a s integer<br /><br />10:<br /><br />a = sonar(0)<br />out 52,0<br />out 8,0<br />delay a<br /><br />a = sonar(0)<br />out 52,1<br />out 8,1<br />delay a<br /><br />goto 10<br />'===================================<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=107">ucrobots</a> — Sat Mar 25, 2006 4:20 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[RubikCube]]></name></author>
<updated>2006-03-24T22:45:07+01:00</updated>
<published>2006-03-24T22:45:07+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=778#p778</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=778#p778"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=778#p778"><![CDATA[
Yeah they are discontinuing it that is why it is 50% off at the stores, not the websites.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=95">RubikCube</a> — Fri Mar 24, 2006 10:45 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[subpilot]]></name></author>
<updated>2006-03-24T19:44:37+01:00</updated>
<published>2006-03-24T19:44:37+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=777#p777</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=777#p777"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=777#p777"><![CDATA[
Radioshack has dis-continued the Vex line due to poor sales. It's turning into a cell phone store with over-priced "universal" chargers.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=86">subpilot</a> — Fri Mar 24, 2006 7:44 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[robosavvy]]></name></author>
<updated>2006-03-24T18:01:48+01:00</updated>
<published>2006-03-24T18:01:48+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=776#p776</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=776#p776"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=776#p776"><![CDATA[
Got the following from Hitec/Multiplex, hope you find it useful:<br /><blockquote class="uncited"><div><br />Regarding Sonar, the pin connection on the manual is described invertedly.<br />Trigger and echo should be changed. The second issue is the delay time.<br />We will put the test source on our download site.<br /></div></blockquote><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=3">robosavvy</a> — Fri Mar 24, 2006 6:01 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[RubikCube]]></name></author>
<updated>2006-03-24T16:32:55+01:00</updated>
<published>2006-03-24T16:32:55+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=775#p775</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=775#p775"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=775#p775"><![CDATA[
ucrobots,<br /><br />I don't know if you know this already, let me try to explain what is happening to your code. ROBOBASIC is not a fully synchronous language, if you read the explanation of WAIT statement, you coud conclude that some of the commands in ROBOBASIC does not wait for the previous command to finish before it executes the next one.  So on your code below SONAR comand will execute before SONAR finishes the PRINT command will be executed as well. That is why your readings are inconsistent or better yet always zero. You also need to give SRF04 time to process the bounced ping if you listen to your SRF04, and it is  ticking very fast you might want to slow it down with DELAY=500<br /><br /><br />DIM I AS BYTE <br />DIM B AS INTEGER <br /><br /><br />PTP SETON <br />PTP ALLON <br /><br />'============================ <br />MAIN: <br /><br />TEMPO 230 <br />MUSIC "o23ggaagg" <br />DELAY 1000 <br /><br />MOTOR 6 <br />MOTOR 8 <br />MOTOR 9 <br /><br />LCDINIT <br /><br />loop1: <br /><br />A = AD(6) <br />wait<br />I = I+1 <br /><br />L2: <br />DELAY 50 <br />Increase your delay<br /><br />B = SONAR(5) 'SRF04 <br />put a WAIT here <br /><br />'IF B = 0 THEN GOTO L2 <br /><br />PRINT "Analog Input 6: "<br />put a WAIT here <br />PRINT FORMAT(A, DEC) <br />put a WAIT here <br />PRINT "Sonar(5): " <br />put a WAIT here <br />PRINT FORMAT(B, DEC) <br />put a WAIT here <br />PRINT " I= " <br />put a WAIT here <br />PRINT FORMAT(I, DEC) <br />put a WAIT here <br /><br /><br />PRINT 13, 10 <br /><br />GOTO loop1 <br />GOTO MAIN<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=95">RubikCube</a> — Fri Mar 24, 2006 4:32 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[RubikCube]]></name></author>
<updated>2006-03-24T14:50:19+01:00</updated>
<published>2006-03-24T14:50:19+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=774#p774</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=774#p774"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=774#p774"><![CDATA[
Thanks for the tip Subpilot.<br /><br />I see you are from California. Did you know that you can buy the Vex ultrasonic sonar sensor from RadioSahck for $19.00 and it will work the same way as the SRF04?<br /><br />Just connect sonar sensor input to MRC-3024 output port and sonar output to MRC-3024 input. It worked for me.<br /><br /><br />Firmware Version is 2.5<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=95">RubikCube</a> — Fri Mar 24, 2006 2:50 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[ucrobots]]></name></author>
<updated>2006-03-24T09:33:22+01:00</updated>
<published>2006-03-24T09:33:22+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=773#p773</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=773#p773"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=773#p773"><![CDATA[
My sonar does not work. The SFR04 is realy ok.<br />I tried all your tips but with no succsess.<br /><br />Another funny thing is that SONAR(8) does not generate any triggerpulse on Port#16, but PULSE(16) does. <img src="http://forum.robosavvy.com/images/smilies/icon_question.gif" alt=":?:" title="Question" /> <br /><br />So what Firmware version do you have ?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=107">ucrobots</a> — Fri Mar 24, 2006 9:33 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[subpilot]]></name></author>
<updated>2006-03-24T05:50:01+01:00</updated>
<published>2006-03-24T05:50:01+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=772#p772</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=772#p772"/>
<title type="html"><![CDATA[Autonomous RN1 or Spare Head 2]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=166&amp;p=772#p772"><![CDATA[
I found that my sonar does work. I was an idiot and was using a Byte varible while the sonar sub spits out integers. <br />Rubic, I am also using the etx command to send data over my Bluetooth link. Rather than divide the value by 64 and lose resolution, you could right shift by 8 to get the upper byte.<br /><br />a16 = SONAR(5) <br />ETX 9600,a16  ' Sends lower byte<br />a16=a16&gt;&gt;8<br />ETX 9600,a16  ' Sends upper byte<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=86">subpilot</a> — Fri Mar 24, 2006 5:50 am</p><hr />
]]></content>
</entry>
</feed>