On Mon, 1 Mar 2021 17:14:01 -0800 (PST), in
gmane.comp.hardware.beagleboard.user set_
<functt-re5jqeeqqe8avxtiumw...@public.gmane.org> wrote:


>I can use config-pin p9.21 uart && config-pin p9.22 uart and have that 
>command turn successful.
>
        So far as I've been able to determine, config-pin (and Adafruit_BBIO)
rely upon cape-universal to provide the pin-mux capability. The OP has
stated that his application disabled cape-universal. As a result,
config-pin, and any configuration required to be performed by Adafruit_BBIO
is likely to fail.

        Using CircuitPython libraries via the blinka adapter layer probably has
similar requirements.

        As for the OP's query:

>If anyone can give tips on how to do a button-based interrupt (abort)
>without BBB_IO, I'm all ears. I guess I could just start programming the
>BBB in C. I already program embedded microcontrollers in that language, so
>why not SBC?

        I've not heard of BBB_IO before. Adafruit_BBIO, OTOH, is common,
followed by using CircuitPython libraries (designed for Arduino-like
boards) via the adapter library "blinka", would be second.

        The trick with Adafruit_BBIO will be in the GPIO setup if
cape-universal is not present, since I believe it provides the system
"files" for the GPIOs that config-pin and Adafruit_BBIO require to
configure the pin.

        If you can get past, say

import Adafruit_BBIO.GPIO as GPIO

GPIO.setup("P8_14", GPIO.IN)                    <<<<<<<< may not work without 
cape

then setting up an "interrupt" would be something like (not a callback --
requires your application to have a polling loop)

GPIO.add_event_detect("P8_14", GPIO.FALLING)
#your amazing code here
#detect wherever:
if GPIO.event_detected("P8_14"):
    print "event detected!"

        Hmmm, according to
https://adafruit-beaglebone-io-python.readthedocs.io/en/latest/GPIO.html
you CAN set up a callback function. Your choice is to detect
rising/falling/both so if you have a pull-up on the pin, and the button
takes it to ground, falling is likely what you'd use. You also need to
specify a "bouncetime" so the callback doesn't get triggered by button
bounces.


        https://circuitpython.readthedocs.io/projects/blinka/en/latest/
describes the blinka adapter for CircuitPython libraries. Off-hand, it
doesn't look favorable for "interrupt" on GPIO.


-- 
Dennis L Bieber

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/qh9t3gtlmogs0i33gpkp24p7219aps2ioo%404ax.com.

Reply via email to