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 / 1214
  monitoring touch sensor
 
Greetings I have recently been learning to program in NQC and have run into a problem. I would like to monitor a touch sensor (with a Scout) so that if the sensor is pressed once and held down a motor runs forward. If the touch sensor is pressed (...) (23 years ago, 31-Aug-01, to lugnet.robotics.rcx.nqc)
 
  Re: monitoring touch sensor
 
(...) FYI, Jason and I ended up with this program: int touch_count=0; int release_count=0; task main() { while (true) { // infinite loop // look for first press until(SENSOR_1 == 1); PlaySound(SOUND_CLICK); touch_count = 1; // wait for 1 second for (...) (23 years ago, 15-Sep-01, to lugnet.robotics.rcx.nqc)

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