With a lot of this stuff, the devil is in the detail, as they say.
You have a 3 mS timeout on your pulseIn. Are you sure the pulse starts in that time?
With a lot of this stuff, the devil is in the detail, as they say.
You have a 3 mS timeout on your pulseIn. Are you sure the pulse starts in that time?