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

Method begin

libraries/AM2315/AM2315.cpp:39–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38#if defined(ESP8266) || defined(ESP32)
39bool AM2315::begin(const uint8_t dataPin, const uint8_t clockPin)
40{
41 if ((dataPin < 255) && (clockPin < 255))
42 {
43 _wire->begin(dataPin, clockPin);
44 } else {
45 _wire->begin();
46 }
47 if (! isConnected()) return false;
48 this->read();
49 return true;
50}
51#endif
52
53

Callers 1

unittestFunction · 0.45

Calls 1

readMethod · 0.95

Tested by 1

unittestFunction · 0.36