@@ -0,0 +1,702 @@
+import mraa%0Aimport time%0A%0A#### Define Procedure to detect PosEdge%0A#### at a Digital Input Pin%0Adef DetectNegEdge(Pin) :%0A  while 1:%0A    if Pin.read() == 1:%0A      time.sleep(0.05)%0A      if Pin.read() == 0:%0A          return%0A%0A##### Programe begins #######%0A%0A### Led Initilization ###############%0A# Set direction of D4 pin to out ####%0ALed = mraa.Gpio(4)%0ALed.dir(mraa.DIR_OUT)%0A%0A### Button Initialization ###########%0A# Set direction of D8 pin to in #####%0AButton = mraa.Gpio(8)%0AButton.dir(mraa.DIR_IN)%0A%0A### Toggle LED for each Neg Edge triggered by Button%0ALed_state = 0%0ALed.write(Led_state)%0Awhile 1:%0A  DetectNegEdge(Button)%0A  if Led_state==0:%0A    Led_state = 1%0A  else%0A    Led_state = 0%0A  Led.write(Led_state)%0A%0A  %0A

Create NegEdgeTrig_Button.py