| 42 | |
| 43 | #if defined(ESP8266) || defined(ESP32) |
| 44 | bool SHT31::begin(const uint8_t address, const uint8_t dataPin, const uint8_t clockPin) |
| 45 | { |
| 46 | if ((address != 0x44) && (address != 0x45)) |
| 47 | { |
| 48 | return false; |
| 49 | } |
| 50 | _address = address; |
| 51 | |
| 52 | _wire = &Wire; |
| 53 | if ((dataPin < 255) && (clockPin < 255)) |
| 54 | { |
| 55 | _wire->begin(dataPin, clockPin); |
| 56 | } else { |
| 57 | _wire->begin(); |
| 58 | } |
| 59 | return reset(); |
| 60 | } |
| 61 | |
| 62 | |
| 63 | bool SHT31::begin(const uint8_t dataPin, const uint8_t clockPin) |