| 32 | |
| 33 | #if defined (ESP8266) || defined(ESP32) |
| 34 | bool AM232X::begin(const uint8_t dataPin, const uint8_t clockPin) |
| 35 | { |
| 36 | if ((dataPin < 255) && (clockPin < 255)) |
| 37 | { |
| 38 | _wire->begin(dataPin, clockPin); |
| 39 | } else { |
| 40 | _wire->begin(); |
| 41 | } |
| 42 | if (! isConnected()) return false; |
| 43 | this->read(); |
| 44 | return true; |
| 45 | } |
| 46 | #endif |
| 47 | |
| 48 |