| 25 | |
| 26 | #if defined (ESP8266) || defined(ESP32) |
| 27 | bool AD5245::begin(uint8_t dataPin, uint8_t clockPin) |
| 28 | { |
| 29 | _wire = &Wire; |
| 30 | if ((dataPin < 255) && (clockPin < 255)) |
| 31 | { |
| 32 | _wire->begin(dataPin, clockPin); |
| 33 | } else { |
| 34 | _wire->begin(); |
| 35 | } |
| 36 | if (! isConnected()) return false; |
| 37 | reset(); |
| 38 | return true; |
| 39 | } |
| 40 | #endif |
| 41 | |
| 42 |