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 / 1278
  Re: How to read the touch sensors on the Scout in NQC?
 
I've sort of solved my problem, but not in a way which really makes total sense. Both of the below fragments work as expectd: #1 if ((SensorValueRaw(1) & SensorValueRaw(0)) != 255) #2 if ((SensorValueRaw(1) != 255) || (SensorValueRaw(0) != 255)) (...) (23 years ago, 16-Dec-01, to lugnet.robotics.rcx.nqc, lugnet.robotics.scout)
 
  Re: How to read the touch sensors on the Scout in NQC?
 
Hi Chris, (...) this is a bit crazy, unless your sensor value is a bit pattern. (...) This is sensible, but are you sure it's ok to use equality and not inequalities like SensorValueRaw(1) < 240? (...) but it's equivalent, also in C, where & is (...) (23 years ago, 16-Dec-01, to lugnet.robotics.rcx.nqc, lugnet.robotics.scout)
 
  Re: How to read the touch sensors on the Scout in NQC?
 
(...) That is what I thought, but it will determine if the touch sensor is pressed. (...) Dunno, I'll try. Then again, if !=255 works... (...) If it were not for Perl I'd never write a line of code ^_^ (23 years ago, 17-Dec-01, to lugnet.robotics.rcx.nqc, lugnet.robotics.scout)

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