Add poll method to GPIO class to detect value changes; use it