# pragma config(Sensor, S1, lightsensor, sensorLightActive) # pragma config(Sensor, S2, touchsensor, sensorTouch) //Code en robotC pour le laser et le pare­choc //Code en MSI2 Clovis Gravel task main( ) { while (SensorValue(touchsensor) = = 0) { if(SensorValue(lightsensor)<50) { motor[motorC] = 0; motor[motorB] = 50; } else { motor[motorB] = 0; motor[motorC] = 50; } } //Si le capteur de choc est activé motor[motorB] = 0; motor[motorC] = 0; motor[motorA] = 60; wait1Msec(3000); }