| | About SensorValueRaw(SENSOR_3) in Scout Zhengrong Zang
|
| | 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)
|
| | |
| | | | Re: About SensorValueRaw(SENSOR_3) in Scout Dave Baum
|
| | | | (...) I think SensorValueRaw(2) should do what you want. I wrote a little test program: ---- int x, y; task main() { y = 0; while(true) { x = SensorValueRaw(2); if (x > (y + 10)) PlaySound(SOUND_CLICK); y = x; } } ---- and it seems to click a lot as (...) (23 years ago, 18-Jul-01, to lugnet.robotics.scout)
|
| | | | |
| | | | | | Re: About SensorValueRaw(SENSOR_3) in Scout Zhengrong Zang
|
| | | | | You are right! I got the raw value of light sensor by SensorValueRaw(2) in Scout. By the way, I found the max raw value of Touch sensor is 255 in Scout, not 1023. Zhengrong (...) (23 years ago, 18-Jul-01, to lugnet.robotics.scout)
|
| | | | | |
| | | | | | | Re: About SensorValueRaw(SENSOR_3) in Scout Dave Baum
|
| | | | | (...) I'll fix the documentation for the next release. Dave (23 years ago, 19-Jul-01, to lugnet.robotics.scout)
|
| | | | | |
| | | | Re: About SensorValueRaw(SENSOR_3) in Scout Chris Barker
|
| | | | 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 = (...) (23 years ago, 16-Dec-01, to lugnet.robotics.scout)
|
| | | | |