[Newbies] Read RasPi GPIO
Herbert König
herbertkoenig at gmx.net
Wed Jan 28 12:45:27 UTC 2015
Hi,
I can successfully read a GPIO Pin on the RasPi if I do it like:
|value|
dataFile ensureOpen.
value := dataFile upToEnd.
dataFile close.
^value
dataFile is the /sys/class/gpio/gpioxx/value file that exists after
exporting gpioxx.
Without the reopening and closing of the file I get '' on subsequent
reads which means that
StandartFileStream>>basicNext answers nil.
Is there a way to get the values without having to close and reopen the
file each time?
Thanks
Herbert
More information about the Beginners
mailing list