OxFloodNet / sensor-device

[Core] Firmware, schematics and guides for building the sensors
MIT License
17 stars 7 forks source link

No message sent when ultrasound has no reading #7

Open crouchingbadger opened 10 years ago

crouchingbadger commented 10 years ago

To recreate the problem, put the sensor in 1-5 second polling cycle. Point the sensor at an angled surface at a distance of a few metres and the radio appears to lose contact. Putting hand in front of sensor causes readings to appear again. (Maximum tested range got up to 445cm so it's not the sensor range.)

I suspect it's something to do with invalid sensor readings when the code is still waiting for a PWM pulse to produce a distance.

thiseldo commented 10 years ago

Interesting. It should respond with 'Max' if there is an invalid reading. Minimum reading is about 20. Code needs a bit of a refresh to handle new jumpers fully.