To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 823
822  |  824
Subject: 
Re: Painful details on RCX.pm problems
Newsgroups: 
lugnet.robotics.rcx
Date: 
Tue, 7 Nov 2000 21:17:47 GMT
Viewed: 
1612 times
  
Luis,

I am here.  I tryed your code.  The interesting this is the first
time I tryed it I got the following results with the towwer turning off
after 5.  But repeated runs of the program dont seem to have any
problems.

0) 41
1) 41
2) 44
3) 45
4) 40
5) 52498
6)
7)
8)
9)

I have tryed to vary the sleep from 0 to 15, changing the sensor modes,
etc, and
cant seem to reproduce the problem.

How is the battery in your towwer? If it is old maybe you need a fresh
one.

What OS version are you running? What dist if it is Linux.  Is this V1.0
of
RCX.pm?

Sorry I can't be more help.

John C. Quillan

More RCX.pm stuff in case John Quillan (to whom I'll be forever indebted, if
this ever works) shows up.

So I have this code:

#!/usr/bin/perl
use LEGO::RCX;

my $rcx = new LEGO::RCX();
$rcx->ping();

$k = 0;

while($k ne 10)
{
    print($k.") ".$rcx->getSensor(1)."\n");
    sleep(5);
    $k++;
}

This should turn on the robot, ask the bot for the sensor value, wait long
enough for the tower to turn off, and then turn it back on to get another
value. Almost without fail I get this:

0)
1) 2322
2)
3)
4)
5)
6)
7)
8)
9)

After #1, the tower just turns off and never turns itself back on. I've tried
to look through RCX.pm to see what could be going wrong, but my very cursory
glance reveals nothing.

Additionally, this isn't a problem with the tower or the port (at least not
directly) since I can start a second copy of this script while the first one is
still running, and it will initialize the tower just fine.

Anyway, any suggestions are appreciated- this may be the last chance I have to
hack on this for some time, so while I'll look deeper at RCX.pm tonight, any
time that can be saved will be appreciated.
Thanks!
Luis

In lugnet.robotics.rcx, Luis Villa writes:
So, I have some more questions to anyone who wants to answer them :) (John,
hope you are listening ;)

1) Do I need to recreate $rcx after a while? It looks to me that under many
circumstances, repeated calls to the RCX will fail to cause the tower to turn
on. Is this a known bug? feature? Anyone?

2) If anyone cares, I'm attempting to teach myself the GTK GUI tools by
building a GUI for RCX.pm which would allow linux users to control their RCX
remotely. If anyone has any feature requests, now is the time to get them in :)
Of course, if I can't figure out why RCX.pm is flaking on me then I can't see
the project getting finished any time soon (no time to recreate the
functionality of RCX.pm in LNP :|

Anyway, hope someone can enlighten me...
Luis


In lugnet.robotics.rcx, Luis Villa writes:
So, I've finally found a little bit of time to play with RCX.pm, and it is
pretty cool. However, I'm having lots of problems convincing the RCX to
actually do things :) it appears that in many cases, the first signal sent to
the RCX is always ignored. Additionally, it appears that multiple commands sent
in succession will all be ignored unless there are sleeps between them (I'm
trying to experiment to see how long the sleeps need to be.)
Anyone have any suggestions as to what I might be doing wrong? Or is this
normal behavior?
Luis



Message has 1 Reply:
  Re: Painful details on RCX.pm problems
 
Luis, I found a half dead 9V battery and put it in my tower. I am getting similar results, except I hang after the first or second reading. Something like: 0) 41 1) 41 And that is it. I for got to ask is it connisistantly after the 4th one things go (...) (24 years ago, 8-Nov-00, to lugnet.robotics.rcx)

Message is in Reply To:
  Painful details on RCX.pm problems
 
More RCX.pm stuff in case John Quillan (to whom I'll be forever indebted, if this ever works) shows up. So I have this code: #!/usr/bin/perl use LEGO::RCX; my $rcx = new LEGO::RCX(); $rcx->ping(); $k = 0; while($k ne 10) { print($k.") (...) (24 years ago, 6-Nov-00, to lugnet.robotics.rcx)

10 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR