Subject:
|
Programming the RCX using Lego's RCX Software
|
Newsgroups:
|
lugnet.robotics.rcx
|
Date:
|
Thu, 12 Jan 2006 06:22:22 GMT
|
Viewed:
|
6981 times
|
| |
| |
I am relatively new to the RIS, the RCX, and the RCX software. Just like many
of you, I discovered pretty quickly that the RCX software is not intuitive to
someone who has done programming before. What I can visualize doing in C, I
struggle to re-create in the RCX 2.0 Software.
However, I'd still like to use the RCX software for a while longer before I make
a move to NQC or other language. First of all, I just like the challenge of
using the RIS the way it was sold. Secondly, I'm holding on to the hope that I
may keep the hobby a little less like work if I live within the constraints of
the graphical language and don't try to do anything too serious (I get enough of
that at work). Lastly, my son helps me with the creations and the programming
and, being 5 years old, he can't read well enough to read regular code. He is
very quickly picking up on the RCX graphical method however. I feel like he'll
get more out of it if I can *show* him the programs.
So, that leaves me trying to figure out the limitations and some (seems to me)
weird behaviors in the RCX software. If there's anybody left who still programs
using it or who remembers these kinds of things, maybe you can help...
1) Is the best timer resolution I can get using the default OS and RCX software
0.1 seconds?
2) If I use software counters to try to time things to a better resolution, how
repeatable would the counts be? In other words, how much does the OS interrupt
user program flow to do things like IR comms and stuff? Will my counts vary
dramatically?
3) Do the tones and music get launched as a separate task? The reason I ask is
that it seems like the program continues on to the next step without waiting for
the tones or music to end.
4) The use of wait, repeat(until), and repeat(while) with sensors is driving me
a bit crazy. Not because I don't understand the concept of wait, repeat(until)
and repeat(while), but because it is unclear how these instructions treat the
sensor inputs in the RCX software. In some cases, it seems like a "pressed"
touch sensor just means that the sensor is "closed". In other cases, it seems
like a "pressed" sensor means that the sensor *gets* pressed. In other words,
it seems like some of the instructions treat the touch sensor as edge triggered
and some as level triggered.
5) Related to #4, I am confused as to why two instructions which should be
equivalent act differently. For instance, a "Repeat While Light Senor is
Bright" acts differently for me than a "Repeat Until Light Sensor is Dark". If
the light sensor's state can only be Bright or Dark, it seems like the two
instructions should be equivalent. The only way I can see that they aren't
equivalent goes back to that whole question of 'edge triggered' vs. 'level
triggered'.
6) Is there somewhere I should go to learn answers to these questions and
others like them? There are a lot of webpages out there related to Mindstorms,
but I didn't find any one place to answer these kinds of questions about the RCX
2.0 Software.
Thanks,
Mike
|
|
Message has 1 Reply: | | Re: Programming the RCX using Lego's RCX Software
|
| (...) In the GUI thing, I think so. The actual firmware ticks every 0.01 seconds though, but you can't really tell where between ticks you are. (...) They may, but probably not. The monitoring code is a pretty constant drain unless the user switches (...) (19 years ago, 12-Jan-06, to lugnet.robotics.rcx)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|