| aSRF04_Setup | Index |
Definition:
| void aSRF04_Setup( | ); |
Return Value:
Description:
This routine sets up the Digital I/O needed to read values from the Devantech SRF04 Sonar Ranging Module. The particular I/O pins used with this device must be specified in two define statements placed BEFORE the include statement for the aSRF04.tea file. These two defined values are:
The aSRF04_INIT pin can be any Digital I/O pin. The aSRF04_ECHO pin must be a pin that has PTIME functionality (on the GP 1.0 module, digital pins 1-4 will work).
Example:
#define aSRF04_INIT aPortDigital2
#define aSRF04_ECHO aPortDigital3
#include <aSRF04.tea> /* after the defines */
aSRF04_Setup();
This would configure Digital I/O pins 2 and 3 for use in reading values from the Devantech SRF04 Sonar Ranging Module.
Related: