| 18 | |
| 19 | #if defined(ESP8266) || defined(ESP32) |
| 20 | Max44009::Max44009(const uint8_t address, const uint8_t dataPin, const uint8_t clockPin) |
| 21 | { |
| 22 | _address = address; |
| 23 | _data = 0; |
| 24 | _error = MAX44009_OK; |
| 25 | _wire = &Wire; |
| 26 | |
| 27 | if ((dataPin < 255) && (clockPin < 255)) |
| 28 | { |
| 29 | _wire->begin(dataPin, clockPin); |
| 30 | } else { |
| 31 | _wire->begin(); |
| 32 | } |
| 33 | } |
| 34 | #endif |
| 35 | |
| 36 |