If it's reading all 1's my guess would be it's a bad sensor or you have it wired backwards.
I have wired a few of these backwards, and they refused to work afterwards. Even after
I re-wired it.
With the flat side facing you, pins downward, from left-to-right, are ground, DQ, Vdd.
Bookmarks