To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.scoutOpen lugnet.robotics.scout in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Scout / 201
200  |  202
Subject: 
Re: About SensorValueRaw(SENSOR_3) in Scout
Newsgroups: 
lugnet.robotics.scout
Date: 
Sun, 16 Dec 2001 07:13:41 GMT
Viewed: 
3535 times
  
Zhengrong,

I'm sure you figured this out by now, but I just got it last night so
here is a task which reads the light sensor and outputs a sound based on
the raw reading.

task drone()
{
CalibrateSensor();
while (shut_up==0)
{
int b = ((SensorValueRaw(2)/2)*Random(1000));
PlayTone (b,10);
}
}

Now if I could only figure out the readings from the touch sensors I'd
be a happy man.

Chris

Zhengrong Zang wrote:

I tried to get raw value of sensors in Scout, the SensorValueRaw(0/1) is ok, I
get the raw values of Sensor1 and Sensor2, but I found SensorValueRaw(2)
doesn't work, no value is returned.
Then I found a example in NQC Guide Version 2.3 r1, it is
SensorValueRaw(SENSOR_3), but it can't be compiled, I found SENSOR_3 is defined
SensorValue(2) in rcx2.nqh.
How can I read raw value of light sensor in Scout?

Br
Zhengrong




Message is in Reply To:
  About SensorValueRaw(SENSOR_3) in Scout
 
I tried to get raw value of sensors in Scout, the SensorValueRaw(0/1) is ok, I get the raw values of Sensor1 and Sensor2, but I found SensorValueRaw(2) doesn't work, no value is returned. Then I found a example in NQC Guide Version 2.3 r1, it is (...) (23 years ago, 14-Jul-01, to lugnet.robotics.rcx.nqc)

5 Messages in This Thread:


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

Custom Search

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