Interrupts in Beaglebone

13,009

Solution 1

Yes there is a standard driver. This page here shows the basic steps for using gpio's.

Solution 2

In Python using Adafruit Libray,

import Adafruit_BBIO.GPIO as GPIO 

Pin = "P8_8" 
GPIO.setup(Pin, GPIO.IN)    # set GPIO25 as input (button)  

def my_callback(channel):  
    if GPIO.input(Pin):    
        print "Rising edge detected on 25"  
    else:                  # if port 25 != 1  
        print "Falling edge detected on 25" 

GPIO.add_event_detect(Pin, GPIO.BOTH, my_callback, 1)

Here is reference link.

Share:
13,009
duslabo
Author by

duslabo

I am an engineer. Link to git

Updated on July 05, 2022

Comments

  • duslabo
    duslabo almost 2 years

    I am reading a hall sensor output in beaglebone gpio pin, for every rising edge the interrupt service routine needs to execute. So, how to use external interrupt in beaglebone? and is there any standard driver for this purpose?

    Thanks.