/****
 * Let's see if that bumper thing works.
 ***/


import josx.platform.rcx.*;

class TestBumper {
    
    public static void main( String[] args ) throws Exception {
	Bumper leftBumper = new Bumper( Sensor.S1 , "in by default");
	TextLCD.print("test");

	while (true) {

	    if ( leftBumper.wasHit() ) {
	    	Sound.beep();
	    }

	    if ( Button.VIEW.isPressed() ){
		int buttonIn = 0;
		if ( leftBumper.isIn() ) buttonIn = 1;
		LCD.showNumber( buttonIn );
	    }

	    if (Button.PRGM.isPressed() ){
		LCD.showNumber( leftBumper.value() );
	    }

	}
    }
}


syntax highlighted by Code2HTML, v. 0.9.1