-
Notifications
You must be signed in to change notification settings - Fork 1
setProximityHz()
Arnd edited this page Dec 31, 2016
·
2 revisions
Proximity is measured with an IR transmitter and receiver on the VCNL4010. This function allows the scanning frequency to be adjusted from the default 1.95 measurements per second. The values range from 1.95 to 250 per second and whatever value is entered is rounded down to one of the following discrete values:
| Binary Value | Hertz Rate |
|---|---|
| 000 | 1.95 measurements/s (DEFAULT) |
| 001 | 3.90625 measurements/s |
| 010 | 7.8125 measurements/s |
| 011 | 16.625 measurements/s |
| 100 | 31.25 measurements/s |
| 101 | 62.5 measurements/s |
| 110 | 125 measurements/s |
| 111 | 250 measurements/s |
VCNL4010 Sensor(); // Instantiate class
...
Sensor.setProximityHz(230); // gets rounded down to 125Hz
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
