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

Method readRaw

libraries/MT8870/MT8870.cpp:43–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43uint8_t MT8870::readRaw()
44{
45 _val = 255;
46 if (available())
47 {
48 _val = 0;
49 if (digitalRead(_q[0]) == HIGH) _val += 0x01;
50 if (digitalRead(_q[1]) == HIGH) _val += 0x02;
51 if (digitalRead(_q[2]) == HIGH) _val += 0x04;
52 if (digitalRead(_q[3]) == HIGH) _val += 0x08;
53 }
54 _lastTimeRead = millis();
55 return _val;
56}
57
58
59uint8_t MT8870::lastRaw()

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36