<?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=1661" />

<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>2007-09-30T21:56:53+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=4&amp;t=1661</id>
<entry>
<author><name><![CDATA[davidalecmcinnes]]></name></author>
<updated>2007-09-30T21:56:53+01:00</updated>
<published>2007-09-30T21:56:53+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11504#p11504</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11504#p11504"/>
<title type="html"><![CDATA[SRF05 ultrasonic problems]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11504#p11504"><![CDATA[
Hi there, <br /><br />Just to close really, <br /><br />I was unable to get the sonar function to report anything but zero in robobasic so I gave up with that approach as I wanted to move on. In the end I  used a 2Hz Low pass filter to produce a dc level which I fed into the A to D port which works fine. Thanks for all your help though, it's much appreciated.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=655">davidalecmcinnes</a> — Sun Sep 30, 2007 9:56 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-09-14T11:15:37+01:00</updated>
<published>2007-09-14T11:15:37+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11076#p11076</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11076#p11076"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11076#p11076"><![CDATA[
I tried your code and it worked for me,if rather slow.<br /><br />I made a couple of changes, first because I put my POKE in an ugly place, and so you did too. Also results can be over 1000, so I added another digit.<br /><br />The POKE is not needed really, since the motors had not been on since power up.<br /><br />Results range from around 30 to 2500 <br />SRF04 is a bit sensitive to local reflecting surfaces. I have foam around the sides of the transducers, and any close surfaces.<br /><br />I have the SRF04 powered from the PWM2 pins. Servo 10 signal goes to middle hole in SRF04, Servo 11 signal to pin between middle and +5V. ERX is connected to a FTDI TTL to usb cable<br /><br /><br />DIM rr AS BYTE <br />DIM echo AS INTEGER <br /><br />DIM thousands AS BYTE<br />DIM hundreds AS BYTE <br />DIM tens AS BYTE <br />DIM ones AS BYTE <br /><br />POKE &amp;H4ec,&amp;hf3 <br /><br />loop: <br />echo = SONAR(5) <br /><br />thousands = 48<br />hundreds=48 <br />tens=48 <br />ones=48 <br /><br />loop2: <br /><br />IF echo&gt;1000 THEN thousands=thousands+1 <br />IF echo&gt;1000 THEN echo=echo-1000 <br />IF echo&gt;1000 THEN GOTO loop2 <br /><br />IF echo&gt;100 THEN hundreds=hundreds+1 <br />IF echo&gt;100 THEN echo=echo-100 <br />IF echo&gt;100 THEN GOTO loop2 <br /><br />IF echo&gt;10 THEN tens=tens+1 <br />IF echo&gt;10 THEN echo=echo-10 <br />IF echo&gt;10 THEN GOTO loop2 <br /><br />IF echo&gt;1 THEN ones=ones+1 <br />IF echo&gt;1 THEN echo=echo-1 <br />IF echo&gt;1 THEN GOTO loop2 <br /><br />ETX 9600,thousands<br />ETX 9600,hundreds <br />ETX 9600,tens <br />ETX 9600,ones <br /><br />ETX 9600,13 <br />ETX 9600,10 <br /><br />DELAY 100 <br />GOTO loop<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Fri Sep 14, 2007 11:15 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[davidalecmcinnes]]></name></author>
<updated>2007-09-12T13:13:37+01:00</updated>
<published>2007-09-12T13:13:37+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11045#p11045</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11045#p11045"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11045#p11045"><![CDATA[
Hi there,<br /><br />I have setup an RS232 link and can send data to hyper terminal, the IR sensor works ok on AD(0) using this program but the sonar is giving me 000 all the time. Here is the complete program:<br /><br />DIM rr AS BYTE <br />DIM echo AS INTEGER <br /><br />DIM hundreds AS BYTE<br />DIM tens AS BYTE<br />DIM ones AS BYTE<br /><br />loop: <br />echo = SONAR(5) <br />POKE &amp;H4ec,&amp;hf3 <br /><br />hundreds=48<br />tens=48<br />ones=48<br /><br />loop2:<br />IF echo&gt;100 THEN hundreds=hundreds+1<br />IF echo&gt;100 THEN echo=echo-100<br />IF echo&gt;100 THEN GOTO loop2<br /><br />IF echo&gt;10 THEN tens=tens+1<br />IF echo&gt;10 THEN echo=echo-10<br />IF echo&gt;10 THEN GOTO loop2<br /><br />IF echo&gt;1 THEN ones=ones+1<br />IF echo&gt;1 THEN echo=echo-1<br />IF echo&gt;1 THEN GOTO loop2<br /><br /><br />ETX 9600,hundreds<br />ETX 9600,tens<br />ETX 9600,ones<br /><br />ETX 9600,13<br />ETX 9600,10<br /><br />DELAY 100 <br />GOTO loop<br /><br />The scope reveals that the SRF04 is doing it's thing, the activation pulse is just over 10us and the echo varies between 0.2ms to 7ms. Any ideas?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=655">davidalecmcinnes</a> — Wed Sep 12, 2007 1:13 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[davidalecmcinnes]]></name></author>
<updated>2007-09-11T14:34:51+01:00</updated>
<published>2007-09-11T14:34:51+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11041#p11041</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11041#p11041"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11041#p11041"><![CDATA[
I upgraded my robobasic, that cured that problem, the SRF04 is now only firing when I call it from basic which is cool, I suspected it was a version problem.<br /><br />However, now I'm getting zeroes all the time, I will get a scope on it alter and check that the SRF04 is doing its thing. I'll get an LCD or RS232 link on to look at the data aswell.<br /><br />Thanks so much<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=655">davidalecmcinnes</a> — Tue Sep 11, 2007 2:34 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-09-11T08:51:55+01:00</updated>
<published>2007-09-11T08:51:55+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11037#p11037</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11037#p11037"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11037#p11037"><![CDATA[
My code snip works just fine with the SRF04.<br /><br />I see the MOTOR command turning on the servo pulses. The MOTOOFF command also turns on the servo pulses, this is the bug.<br /><br />The Poke turns off the servo pulses.<br /><br />I am using Robobasic 2.5e, 2.5.61. Download from<br /><br /><!-- m --><a class="postlink" href="http://www.robonova.de/store/support/index.php?_m=downloads&amp;_a=viewdownload&amp;downloaditemid=95&amp;nav=0,6">http://www.robonova.de/store/support/in ... 95&amp;nav=0,6</a><!-- m --><br /><br />Can you post your full code ? You must be turning the motors on somewhere. Maybe as part of a group<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Tue Sep 11, 2007 8:51 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[davidalecmcinnes]]></name></author>
<updated>2007-09-11T08:34:53+01:00</updated>
<published>2007-09-11T08:34:53+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11036#p11036</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11036#p11036"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11036#p11036"><![CDATA[
The ROMPOKE did compile but didn't make any difference to the operation. Ah well<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=655">davidalecmcinnes</a> — Tue Sep 11, 2007 8:34 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[davidalecmcinnes]]></name></author>
<updated>2007-09-11T08:09:35+01:00</updated>
<published>2007-09-11T08:09:35+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11035#p11035</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11035#p11035"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11035#p11035"><![CDATA[
Thank you for all your help, it is much appreciated. I am still stuck with this non compiling problem unfortunately which I will have to resolve, could be a version issue.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=655">davidalecmcinnes</a> — Tue Sep 11, 2007 8:09 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-09-10T17:29:51+01:00</updated>
<published>2007-09-10T17:29:51+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11019#p11019</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11019#p11019"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11019#p11019"><![CDATA[
I just tried it. Mine compiles and works fine:<br /><br />DIM rr AS byte<br />DIM echo AS INTEGER<br />loop:<br />echo = SONAR(5)<br />POKE &amp;H4ec,&amp;hf3<br />PRINT &amp;HFE<br />PRINT &amp;H01<br />PRINT &quot;Distance =&quot;<br />PRINT FORMAT(echo,DEC,4)<br />DELAY 100<br />GOTO loop<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Mon Sep 10, 2007 5:29 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[davidalecmcinnes]]></name></author>
<updated>2007-09-10T17:18:50+01:00</updated>
<published>2007-09-10T17:18:50+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11018#p11018</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11018#p11018"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11018#p11018"><![CDATA[
Hi there,<br /><br />Thanks for the information, sounds promising. Unfortunately the darn program wont compile with an address higher than 255, it reports:<br /><br />Error 20 : [POKE] Can't use integer-type<br /><br />I have tried all the variations I can think of such as decimal, declaring integers, etc.<br /><br />Any thoughts?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=655">davidalecmcinnes</a> — Mon Sep 10, 2007 5:18 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-09-10T14:55:08+01:00</updated>
<published>2007-09-10T14:55:08+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11017#p11017</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11017#p11017"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11017#p11017"><![CDATA[
The 24 Motor enable bits are at memory locations $H4EB, &amp;H4EC, and &amp;H4ED, with bits representing enabled or not.<br /><br />Motors 10 and 11 should be bits 2 and 3 of &amp;H4EC. So try:<br /><br />POKE &amp;H4EC, &amp;HF3<br /><br />This should clear the enables and turn off those motors. If this doesn't work, let me know and I will dig out my SRF04 to try.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Mon Sep 10, 2007 2:55 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-09-10T08:13:49+01:00</updated>
<published>2007-09-10T08:13:49+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11012#p11012</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11012#p11012"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=11012#p11012"><![CDATA[
The motors should be off by default on power up. So if you avoid any MOTOR or MOTOROFF for those port, either individually or as part of a group , they should not have any pulses.<br /><br />It should be possible to turn them off with a POKE. I will check the memory locations and let you know.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Mon Sep 10, 2007 8:13 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[davidalecmcinnes]]></name></author>
<updated>2007-09-10T07:52:02+01:00</updated>
<published>2007-09-10T07:52:02+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10998#p10998</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10998#p10998"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10998#p10998"><![CDATA[
HI there, thanks for your response, I removed the motoroff commands to no avail, the servo pulses are still there continuously. Is there any command which turns them off, otherwise you wont be able to use digital outputs? I have Robobasic 2.5.17 at the moment, I'll check for updates.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=655">davidalecmcinnes</a> — Mon Sep 10, 2007 7:52 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-09-09T13:34:35+01:00</updated>
<published>2007-09-09T13:34:35+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10968#p10968</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10968#p10968"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10968#p10968"><![CDATA[
I am using Robobasic V2.5e, which shows in the about window as 2.5.61. This still appears to compile the MOTOROFF to a MOTOR instruction. Even though it says here, that MOTOROFF was fixed in the previuos version.<br /><br />- 2006/11/29 : Add PC direct motor control function in roboScript v2.6<br />- 2006/10/26 : Bug fix of MOTOROFF command.<br />- 2006/10/12 : Bug fix in ROBONOVA zero value setting window.<br />- 2006/01/26 : Bug fix of left/right motors control in ROBONOVA motor control window.<br />- 2006/01/26 : Add command &quot;OFFSET&quot; for zero value modification in real time.<br /><br />Does anyone have a version which works ?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Sun Sep 09, 2007 1:34 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[i-Bot]]></name></author>
<updated>2007-09-08T17:35:27+01:00</updated>
<published>2007-09-08T17:35:27+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10963#p10963</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10963#p10963"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10963#p10963"><![CDATA[
What you are seeing are servo pulses, 1.5 ms (centre) every 12ms (no Gyro enabled).<br /><br />There is a problem with the motor on/off commans in Robobasic. I have not checked which versions this relates to, though there is mention in the release notes. The MOTOROFF actually turns the servo on !<br /><br />Try with removing the MOTOROFF commands.<br /><br />Don't bother trying to use Robobasic for timing, it is too slow.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=159">i-Bot</a> — Sat Sep 08, 2007 5:35 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[davidalecmcinnes]]></name></author>
<updated>2007-09-08T10:50:01+01:00</updated>
<published>2007-09-08T10:50:01+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10956#p10956</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10956#p10956"/>
<title type="html"><![CDATA[srf04 on rn]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=1661&amp;p=10956#p10956"><![CDATA[
Hi there, <br /><br />I've actually been using an SRF05, a low current version connected to the 5V.<br /><br />It behaves erratically though, detecting nothing at random and not responding to objects when it should.<br /><br />I took a scope to it and found that the input trigger is activated every 12ms continuously, according to my measurements for a duration of 1.5ms.<br /><br />The input trigger is arriving at the SRF05 and the echo comes back about 750us later, the positive width of the echo is directly proportional to distance so the SRF05 is working.<br /><br />However, the time between the end of the echo and the next input trigger pulse is relatively short, sometimes as low as 2-3ms. <br /><br />The timing diagram for the SRF04 indicates that the delay before the end of the echo and the next input trigger must be at least 10ms but the SRF05 is giving a valid response every time.<br /><br />This is the code I used.<br /><br />DIM son1 AS INTEGER<br /><br />MOTOROFF 10<br />MOTOROFF 11<br /><br />son1=SONAR(5)<br />DELAY 500<br /><br />IF son1&lt;10 THEN son1=500<br />IF son1&lt;250 THEN GOSUB grab<br /><br />I have  a query in with hitec on this problem at the moment but I am thinking to use a 3rd order filter low pass filter on the output to produce a dc level instead. My colleague is looking at setting up a timer in robobasic and triggering it manually.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=655">davidalecmcinnes</a> — Sat Sep 08, 2007 10:50 am</p><hr />
]]></content>
</entry>
</feed>