我正在运行一个beaglebone和一个覆盆子pi。我可以在路径/ sys / class / gpio中轻松读取gpio。我可以轻松地使用Web服务器从一台机器到另一台机器读取gpio状态,但我想知道是否有更好的低层方式通过网络映射gpio文件夹。我尝试过NFS但是我在运行debian wheezy image的树莓派上得到了这个警告:
pi@raspberrypi ~ $ sudo service nfs-kernel-server restart
[ ok ] Stopping NFS kernel daemon: mountd nfsd.
[ ok ] Unexporting directories for NFS kernel daemon....
[....] Exporting directories for NFS kernel daemon...exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.178:/sys/class/gpio".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
exportfs: /sys/class/gpio does not support NFS export
. ok
[....] Starting NFS kernel daemon: nfsd
[warn] Not starting: portmapper is not running ... (warning).
因此,看起来gpio不支持通过NFS进行映射。有没有人知道另一种方法呢?
谢谢! 贾斯汀