Add getPinMode in run