Nxt Touch Sensor different

81 Views Asked by At

I am asking in this website to ask if someone knew how to translate the LEGO MINDSTORMS Touch Sensor function of Pressed, Bumped, and Released to eclipse-oxygen language. I already know pressed:

TouchSensor touch = new TouchSensor(SensorPort.S1);
  int count = 0 ;
  while(count<10){ 
      if(touch.isPressed()){

}

So I ask to know if someone knew the code for it to act when it is BUMPED. Please and thanks for your help.

0

There are 0 best solutions below