| aSRF08_RangeGain | Index |
Definition:
| void aSRF08_RangeGain( | unsigned char rangerAddress, unsigned char maxGain, unsigned char maxRange); |
Parameters:
| rangerAddress | - | The I2C address of the ranger to be read. |
| maxGain | - | The maximum gain the ranger will increase to on taking a reading. |
| maxRange | - | The maximum range for the sensor reading. |
Return Value:
Description:
This routine sets the amplifier gain and maximum range for a Devantech SRF08 Sonar Ranging Module . This routine also works with SRF10 and SRF235 modules equally well. These values are not persistent and need to be reset after each power up of the sensor. The defaults for the sensor on power up are always restored to maximum gain and range.
This routine is useful when using multiple SRF08, SRF10, or SRF235 sensors in close proximity with simultaneous (broadcast) readings. It can help avoid interference between the multiple sensor pings.
This routine is available in the aSRF08.tea library file in all builds after build 22.
| Credit: | Thanks to Samuel Miller for contributing this routine |
Example:
aSRF08_RangeGain(0xE0, 31, 255);
This would set the ranger's gain and range to the default (power up) values.