// NQC ( Not Quite C ) // KletterMaxe.nqc // sensor #define STOP SENSOR_1 // motor #define MOTOR OUT_A #define UP OUT_FWD #define DOWN OUT_REV sub init(){ SetSensor( STOP, SENSOR_TOUCH ); SetDirection( MOTOR, UP ); SetPower( MOTOR, 9); Off( MOTOR ); } task main() { init(); On( MOTOR ); while( STOP == 1); while( STOP == 0); SetDirection( MOTOR, DOWN ); while( STOP == 1); while( STOP == 0); Off( MOTOR ); }