Block diagram of the transmitter. It consists of an Atmel board controlling the ultrasonic ranger and the RF transmitter.


 
Method Summary
init()
          Initialize all variables.
measure()
          Transmits a single pulse from the ultrasonic emitter.
t0_ovfl()
          Used to set system timer
t1_capt()
          Capture event happens on falling edge of ICP.
t1_ovfl()
          Timer1 overflow ends waiting for a pulse after 16.384 ms Stops timer1
TransmitDistance()
          Transmits the latest position reading out the RF transmitter

Method Detail

measure

void measure()
Transmits a single pulse from the ultrasonic emitter. Hold the ranger's input trigger high for > 10ms Starts timer1 at full clock to record time

init

void init()
Initialize all variables. Set serial port to 9 bit mode@1200 baud Sets ICP to capture on falling edge

TransmitDistance

void TransmitDistance()
Transmits the latest position reading out the RF transmitter

t0_ovfl

void t0_ovfl()
Used to set system timer

t1_capt

void t1_capt()
Capture event happens on falling edge of ICP. If waiting for response, load capture reg into currDist and stop timer1

t1_ovfl

void t1_ovfl()
Timer1 overflow ends waiting for a pulse after 16.384 ms Stops timer1