Closed ratio-x closed 2 years ago
@ratio-x Should there be a default address in the .h and add this as default parameter in the constructor
#ifndef MS5611_DEFAULT_ADDRESS
#define MS5611_DEFAULT_ADDRESS 0x77
#endif
....
explicit MS5611(uint8_t deviceAddress = MS5611_DEFAULT_ADDRESS );
which would allow a command line parameter to set the default address?
Yes, an optional parameter for the constructor, which is 0x77 by default, would be a good solution.
As stated in the MS5611 documentation and in the example sketches, MS5611's address can be configured by wiring CSB pin to VCC (0x76) or to GND (0x77). MS5611's documentation suggests not to leave CSB pin unconnected/unwired. However, if unconnected/unwired, 0x77 is the default address.
Currently all example sketches are configured to use 0x76 address. This should be changed to 0x77.