#pragma config(Sensor, S1, color, sensorEV3_Color, modeEV3Color_Ambient) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// task main() { while(true) { if (getColorAmbient(color) <= 15) { drawBmpfile(10, 120, "Light off"); } else { drawBmpfile(10, 120, "Light on"); } } }