Try using sysfs-gpio instead of RPi