SimpleGPIO

I’m writing an app to drive three closed-loop stepper motors. To make things easy on myself, I’m using Derek Molloy’s EasyDriver and SimpleGPIO code (ref. GitHub - derekmolloy/beaglebone: Derek Molloy DCU Repository of code used in the Beaglebone videos on my YouTube Channel). Unfortunately, these files are 9 years old and I’m afraid they’re out of date. The symptom is that after I run my program, the GPIOs used by the motors disappear from the /sys/class/gpio directory. Not being a Linux guru, my suspicion is that the process of exporting / unexporting the pins is the culprit. Questions:

  1. Is it still necessary to export / unexport pins?
  2. How can I make the pins reappear other than rebooting?
  3. Can I just crib code from config-pin.c to replace SimpleGPIO?

TIA

1 Like

Things get much more easy when you drive the GPIO pins by libpruio.

Since RCN is obviously not able to support binary packages, it seems mandatory to compile from source.

Regards

I commented out all of the export() and unexport() lines in EasyDriver.cpp and recompiled. Everything is working, so the answer to #1 is NO! That makes the answers to the other two questions less important.

@Thomas: I’m sure libpruio works well for you and for those who are willing to compile it from source. Although Derek Molloy’s SimpleGPIO is no longer maintained, at least it’s in C, so I can just add it to my project and use it. Even better, it’s <200 LOC, with lots of blank lines and repetition, so I can easily understand what’s being done.

Please be aware that your comments about RCN may just sound direct in German, but in American English they come across as harsh. The principles taught in Andrew Carnegie’s “How to Win Friends and Influence People” have helped me to get along much better in the business and social worlds.

Just for fun, my handle, dr_eck, is a reference to a billboard that figures prominently in The Great Gatsby, a 1925 novel by American writer F. Scott Fitzgerald.

@Stephen: many thanks for the hint on how my words come across in English!

Anyhow, the missing binary packages is not my issue. You could have much better support for using the great features of the AM335x CPU. Perhaps you want to use your communication skills in your native language to help yourself (and other users) saving money in a much faster developing process (and single source from kernel 3.8 to now).

The Beaglebone hardware could get a replacement for the outdated Adruino hardware, if the CPU features would be easy to access. It makes me angry that the board managers and TI software engineers do nothing to make this happen. We all would benefit from a bigger market.