I think you have to poll. This would be another feature that might go
on the list to be done with LCB.
-= Mike
On 6/10/16 1:26 PM, Richard Gaskin wrote:
Earlier I wrote:
> What is "the file method"? How do I treat GPIO connections as file
> paths? Somewhere in /proc?
>
> Earlier you wrote:
>
> Look at the comments in the library it self for how to solve
> the Accessing the GPIO (of a raspberry pi) without "sudo" problem.
>
> The stack script isn't very big, and perhaps I'm just pre-coffee but I
> couldn't find anything there about sudo.
>
> Where should I be looking?
Coffee helped. I was looking in "the stack itself", and then for a
"Hardware" section, overlooking the "Raspberry Pi" section right there
in front of me once I thought to scroll down to look for it. :)
It seems the "files" method is using a mounted virtual file system,
similar to /proc or /run/shm, which are actually elements in RAM
accessible through file-like paths in keeping with the Unix tradition
of "everything is a file". This appears to be the common method for
obtaining GPIO data:
<https://sites.google.com/site/semilleroadt/raspberry-pi-tutorials/gpio>
Thanks for maintaining the Master Lib - with what's there I should be
able to poke around and get what I need.
One last question for now: is there any mechanism accessible to use
in LiveCode that allows our app to subscribe to events in
/sys/class/gpio, or do we need to poll for changes?
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode