The sensor is digital right? 켜짐 또는 꺼짐, 낮음 또는 높음 또는? So write code to read the sensor and if it is HIGH you turn a led on UNO has builtin led on pin , I dunno about the MEGA and if it is LOW you turn the led off.