1. A method for detecting an object, the method comprising the steps of: (a) generating a first signal which has plural discrete states which occur in an irregular sequence and in which transitions between states occur at varying time offsets with respect to notional regular clock pulses; (b) transmitting, in response to each state transition in the first signal, a pulse which is encoded according to the type of state transition; (c) obtaining a received signal comprising reflections of the transmitted pulses; (d) deriving a reference signal from the first signal; (e) introducing a delay between the received signal and the reference signal; (f) deriving an output value dependent on the extent to which pulses in the received signal coincide with transitions in the reference signal; and (g) determining, in dependence on said output value, whether an object is located at a range corresponding to said delay.