Reading distance from SRF05 range finder

I am currently able to read distance from the SRF05 range finder. However I faced a problem when the sensor is detecting distance of more than the maximum range which is 4metre. When this happen I will get a negative value. Is there a way to limit the value so that even when the distance sense is more than 4metre, the output value will be a positive value larger than 4metre and not a negative value.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…