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

Method read

libraries/AnalogPin/AnalogPin.cpp:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40
41int AnalogPin::read(const bool twice)
42{
43 if (twice) _rawRead();
44 _rawRead();
45 if ( (_noise == 0) || (((_value - _prevValue) & 0x7FFF) > _noise) )
46 {
47 _prevValue = _value;
48 }
49 return _prevValue;
50}
51
52
53int AnalogPin::readSmoothed()

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36