#include <osonar.h>
Public Member Functions | |
| oSonarDV (IOLINE channel, PORT port, IOLINE itpu) | |
| TPU channel / Control channel. | |
| void | ping (void) |
| Activates the sonar sounding mechanism. | |
| INT_MILLIMETER | value (void) |
| Returns last distance returned from sonar in millimeters. returns 0 if no sounding. | |
D= (T*62.5*(16/clock_speed)*TCR1)/(73746*2) (nanoseconds) where: D is distance in inches T is PTA count of TCR1 "ticks" clock_speed is 8,16,or 25 TCR1 is "number of clocks" per TPU Ref. 2-2 (TCR1 divisor). Ref: OOMRM TPU TCR1 definition).
|
||||||||||||||||
|
TPU channel / Control channel.
|
1.3