To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1802
1801  |  1803
Subject: 
Re: direct manipulation of bits in RCX registers using NQC
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Fri, 16 Sep 2005 00:07:39 GMT
Viewed: 
6118 times
  
Hey,

Thanks for all the helpful responses, everyone.

Brian:

In lugnet.robotics.rcx.nqc, Brian Davis wrote:
   From a brief reading of that manual, it talks about programming the H8 chip
inside the RCX *directly*, not running programs layered on top of the standard
firmware.


I guess that "firmware" must be the code that tells RCX how to interpret user
instructions (NQC, C, IC, opcodes, or whatever), and convert them to binary
machine-specific code. Right?

If that's true, then I see how it makes a difference what firmaware is loaded.
The firmware version will dictate exactly what communication is and is not
available between the user and the RCX.


Thanks for the very helpful comments & links about optimizing proximity
detection, etc. I will try some of these out.

So far, just using the IR Comm port as a "sender", and two LEGO light sensor
bricks as receivers (at ~45 deg angles to straight ahead), my bot can sense and
avoid flat walls & wall corners ~1 foot away. I am already doing stuff like
averaging over several sequential sensor measurements.

In general, the problems that I want to solve are a) better discrimination of
what's an "obstacle" (e.g., now my bot avoids flat white walls 1-20 cm away, but
runs straight into 2 cm diameter chair legs), b) would be great to do some
actual distance estimation instead of just turning away from everything that
seems to be "in the way".



Steve and Danny:

Unfortunately, this is pretty much your only option.  There is no way to
power the sensor, but switch the light off.  That's all part of the sensor,
and the sensor does not have that ability.

Thanks. after looking at http://www.plazaearth.com/usr/gasperi/light.htm I now
understand this.


Now to acheive what you want, it might be a waste of power, but you
could always blank off the light itself with a peice of black card or
thin black packing plastic.
If trying to stick to an all lego
solution, maybe using a technic 2x1 beam in front of the sensor will
blank off the lamp?


I tried both these things already too. Sliding a thin plastic card between the
LED and sensor didn't do much, but I might not have gotten it in far enough.
Probably should have taken it apart first.

I also tried the 2x1 beam, it blanked off the lamp, but the baseline sensor
reading didn't change much. Presumably both of these non-effects were for the
reason given by Gasperi:

"Notice that with the LED the Light reading never goes to 0. Not because the LED
shines on the phototransistor, but simply the way the LED biases the circuit. "


I'll keep plugging away, and let y'all know how I get on.

Thanks again for your help!


Matt



Message has 1 Reply:
  Re: direct manipulation of bits in RCX registers using NQC
 
(...) Correct. A NQC command (say, "Wait(10);") is converted to one or more "bytecodes" (in this case, one bytecode, namely a string of 4 bytes (0x43 0x02 0x0a 0x00), the first of which is a command (0x43) while the following three are information (...) (19 years ago, 16-Sep-05, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: direct manipulation of bits in RCX registers using NQC
 
(...) I agree with Steve that the code samples you posted are probably BrickOS. Now to acheive what you want, it might be a waste of power, but you could always blank off the light itself with a peice of black card or thin black packing plastic. If (...) (19 years ago, 13-Sep-05, to lugnet.robotics.rcx.nqc)

13 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