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 / 789
788  |  790
Subject: 
Re: NQC & Rotation Sensor
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Tue, 26 Sep 2000 07:08:08 GMT
Viewed: 
2190 times
  
Dave Baum wrote:

In article <39CEBCC3.74DFFF0C@akasa.bc.ca>, Dean Husby
<nntp@akasa.bc.ca> wrote:

I have this program that monitors the location of a camera mount in a
360 degree turn. (0 and 16 are 0, 8 is 180 etc) However whenever I use
SetSensor(SENSOR_2, SENSOR_ROTATION);
it blanks the current sensor value when the program is restarted. This
is a HUGE pain as it takes time to reset the mount to 0 if the RCX
powers down.


The reset is a consequence of one of the bytecodes used to configure the
sensor.  I don't see a way to work around it.

I tried to use the other way but so far I can't get it to work.
SetSensorType(SENSOR_2, SENSOR_ROTATION);
SetSensorMode(SENSOR_2, SENSOR_MODE_ROTATION);


This will have the same problem - in fact the generated code is probably
identical (except for perhaps order) to just calling SetSensor().

Sorry I can't help with this one.


Dave,

Thanks for the reply, I had a bad feeling it would be this way. If that
wasn't bad enough it keeps losing 2 points when stepped from 0 to 16 and
back again... Most annoying. I'm going to move to a touch sensor bump
mode... This way my Scout and it's limited resources can be the slave...

Dean
--
Coin-Op's For Sale!: http://www.akasa.bc.ca/tfm/coin-op.html
Dean's Lego Workshop: http://www.akasa.bc.ca/tfm/lego_wr.html
Vancouver Lego Club: http://www.akasa.bc.ca/vlc



Message has 1 Reply:
  Re: NQC & Rotation Sensor
 
(...) Do you have the sensor at a place where one rotation of the sensor = 360 degrees of whatever you're turning? I'd suggest putting it somewhere where it rotates a lot more times than the actual turntable. (You need a touch sensor for 0 this way, (...) (24 years ago, 26-Sep-00, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: NQC & Rotation Sensor
 
(...) The reset is a consequence of one of the bytecodes used to configure the sensor. I don't see a way to work around it. (...) This will have the same problem - in fact the generated code is probably identical (except for perhaps order) to just (...) (24 years ago, 26-Sep-00, to lugnet.robotics.rcx.nqc)

4 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