Good question. If I were you, I would compare your code to the working code example ( http://www.picbasic.co.uk/forum/show...6483#post46483 ) and see what's different about them, as far as how they read and write to the sensor. Also, I would see what you get when you pull the sensor out of the breadboard, if there is one. If you have a scope or better yet, a logic analyzer like: http://www.saleae.com/logic . I would connect it to the signal pin, and see what's happening. If you have a diagram of how you are connecting the sensor, I would include it here, so others can help you better.