-
Notifications
You must be signed in to change notification settings - Fork 1
setAmbientLight()
This function sets the sample rate and averaging for the ambient light measurements. The first parameter is the sampling rate, which ranges from 1 to 10 samples per second. The second parameter is the number of readings used to compute the value, the averaging ranges from 1 to 128 in powers of 2 (i.e. 1,2,4,8,...128) and the parameter value passed in is rounded down to the closest value.
VCNL4010 Sensor(); // Instantiate class
...
Sensor.setAmbientLight(4,32); // sample 4 times per second and average 32 readings
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
