Build your max Patch so that it controls LEDLight-emitting diode from a simple Analog sensor (e.g. cable or so). See examples (arduino sketch and max patch) for ideas