import RPi.GPIO as GPIO
import time

SWITCH_PORT = 23

GPIO.setmode(GPIO.BCM)
GPIO.setup(SWITCH_PORT,  GPIO.IN, pull_up_down=GPIO.PUD_UP)


def my_callback(channel):
    print "falling edge detected on 17"

GPIO.add_event_detect(SWITCH_PORT, GPIO.FALLING,
                      callback=my_callback, bouncetime=300)

try:
    while True:
        time.sleep(0.1)
except KeyboardInterrupt:
    GPIO.cleanup()
GPIO.cleanup()

@@ -20,20 +20,8 @@
 GPIO
-%0Aimport time
 %0A%0ASW
@@ -207,17 +207,17 @@
 ent_dete
-c
+x
 t(SWITCH
@@ -301,110 +301,4 @@
 00)%0A
-%0Atry:%0A    while True:%0A        time.sleep(0.1)%0Aexcept KeyboardInterrupt:%0A    GPIO.cleanup()%0AGPIO.cleanup()%0A

Revert "corrections mineures"