MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / begin

Method begin

libraries/SHT31/SHT31.cpp:44–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43#if defined(ESP8266) || defined(ESP32)
44bool 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
63bool SHT31::begin(const uint8_t dataPin, const uint8_t clockPin)

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36