Changed code to use PIGPIO instead of rpio