Adds naive algorithm for pull-up detection.