On Mon, 6 Apr 2020 20:19:49 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user KenUnix
<[email protected]> wrote:
> int fd = open( "/sys/class/gpio/gpio112/value", O_RDWR | O_CLOEXEC );
I note you are using the low-level file descriptor calls, whereas most
code I've seen make use of higher level file pointer calls.
https://stackoverflow.com/questions/34261512/gpio-on-beaglebone-black
{somewhat odd that that example does a SEEK to beginning, for files opened
"w", but does not do a seek within the loop when toggling the GPIO value}
I'll admit most of my experiments have been using Python (and I do not
envisage Adafruit_BBIO just vanishing some day... not unless it too gets
subsumed into CircuitPython via Blinka library [a lot of the former device
specific libraries have gone that route]).
No experience with https://github.com/ehayon/BeagleBone-GPIO which
bypasses the sysfs calls for memory-mapping the GPIO system.
https://www.beyondlogic.org/an-introduction-to-chardev-gpio-and-libgpiod-on-the-raspberry-pi/
focuses on the R-Pi, but ...
debian@beaglebone:~$ apt-cache search gpiod
gpiod - Tools for interacting with Linux GPIO character device - binary
gpiod-dbgsym - debug symbols for gpiod
libgpiod-dev - C library for interacting with Linux GPIO device - static
libraries and headers
libgpiod-doc - C library for interacting with Linux GPIO device - library
documentation
libgpiod0 - C library for interacting with Linux GPIO device - shared
libraries
libgpiod0-dbgsym - debug symbols for libgpiod0
libgpiod1 - C library for interacting with Linux GPIO device - shared
libraries
libgpiod1-dbgsym - debug symbols for libgpiod1
libgpiod2 - C library for interacting with Linux GPIO device - shared
libraries
libgpiod2-dbgsym - debug symbols for libgpiod2
python3-libgpiod - Python bindings for libgpiod (Python 3)
python3-libgpiod-dbgsym - debug symbols for python3-libgpiod
debian@beaglebone:~$
... seems to be available on BBB -- no idea what the 0/1/2 variants are...
(unfortunately, the link mentions the C API, but doesn't show an example)
>
>No errors. Just dosen't do anything
>
Take off the relay board and just wire in an LED and limit resistor
between the GPIO and ground (or 3.3V depending on whether you want "set" to
be on or off) and see if the LED flickers.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/dn8p8f5i3ov8l0jadqr4e6h22d522hqu2h%404ax.com.