def add_event_detect(self, pin, edge, callback=None, bouncetime=-<NUM_LIT:1>):
kwargs = {}<EOL>if callback:<EOL><INDENT>kwargs['<STR_LIT>']=callback<EOL><DEDENT>if bouncetime > <NUM_LIT:0>:<EOL><INDENT>kwargs['<STR_LIT>']=bouncetime<EOL><DEDENT>self.rpi_gpio.add_event_detect(pin, self._edge_mapping[edge], **kwargs)<EOL>
Enable edge detection events for a particular GPIO channel.  Pin 
        should be type IN.  Edge must be RISING, FALLING or BOTH.  Callback is a
        function for the event.  Bouncetime is switch bounce timeout in ms for
        callback