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

Method read

libraries/SHT2x/SHT2x.cpp:91–109  ·  view source on GitHub ↗

//////////////////////////////////////////////////// SYNCHRONOUS INTERFACE

Source from the content-addressed store, hash-verified

89// SYNCHRONOUS INTERFACE
90//
91bool SHT2x::read()
92{
93 // TEMPERATURE
94 if (requestTemperature() == false) return false;
95 while (reqTempReady() == false)
96 {
97 yield();
98 };
99 if (readTemperature() == false) return false;
100
101 // HUMIDITY
102 if (requestHumidity() == false) return false;
103 while (reqHumReady() == false)
104 {
105 yield();
106 };
107 if (readHumidity() == false) return false;
108 return true;
109}
110
111
112/////////////////////////////////////////////////////////

Callers 1

readBytesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected