REQUIRES

One or more sonar rangers using the trigger echo system.

TO BUILD

gcc -Wall -pthread -o SRTED test_SRTED.c SRTED.c -lpigpiod_if2

TO RUN

./SRTED -t10 -e16 # single reading from ranger on GPIO 10/16

./SRTED -t5 -e7 -i0.3 # read ranger on GPIO 5/7 every 0.3 seconds

SRTED returns three values.  A status, the range in centimetres, and
the round trip time in microseconds.  The status is one of the
following.  0 (good) indicates a successful read.  The other values
indicate a read failure and the last good read will be returned.

#define SRTE_GOOD      0
#define SRTE_BAD_RANGE 1
#define SRTE_TIMEOUT   2

