add functionality of reading value of GPIO pin