| 41 | |
| 42 | #if defined (ESP8266) || defined(ESP32) |
| 43 | bool MS5611::begin(uint8_t dataPin, uint8_t clockPin, TwoWire * wire) |
| 44 | { |
| 45 | if ((_address < 0x76) || (_address > 0x77)) return false; |
| 46 | |
| 47 | _wire = wire; |
| 48 | if ((dataPin < 255) && (clockPin < 255)) |
| 49 | { |
| 50 | _wire->begin(dataPin, clockPin); |
| 51 | } else { |
| 52 | _wire->begin(); |
| 53 | } |
| 54 | if (! isConnected()) return false; |
| 55 | |
| 56 | return reset(); |
| 57 | } |
| 58 | #endif |
| 59 | |
| 60 |