-
Notifications
You must be signed in to change notification settings - Fork 2
clearInterrupt()
Arnd edited this page Jan 1, 2017
·
1 revision
This function will clear the interrupt settings. If no parameter is specified then all flags are cleared, but it is possible to just clear specific values by bit position as follows:
Bit | Value |
---|---|
0 | High Threshold reached |
1 | Low Threshold reached |
2 | Ambient light reading ready |
3 | Proximity reading ready |
VCNL4010 Sensor(); // Instantiate class
...
while (!Sensor.begin()); // Initialize the VCNL4010
uint8_t interruptFlags = Sensor.getInterrupt(); // Get values
if(interruptFlags) {
Sensor.clearInterrupt(B0011); // clear only threshold values if set
}
Overview
Installation
Class Instantiation
begin()
setProximityHz()
setLEDmA()
setProximityFreq()
setAmbientLight()
setAmbientContinuous()
setProximityContinuous()
setInterrupt()
getAmbientLight()
getProximity()
getInterrupt()
clearInterrupt()
readByte() (advanced)
readWord() (advanced)
writeByte() (advanced)
-none-
CheckDistance.ino
DisplayMeasurements.ino
RegressionTests.ino
WakeOnInterrupt.ino