Skip to content

setProximityFreq()

Arnd edited this page Dec 31, 2016 · 2 revisions

SetProximityFreq()

Proximity is measured with an IR transmitter and receiver on the VCNL4010. This function allows the frequency of the IR square wave to be adjusted from among 5 values as follows:

Binary Value Frequency
000 390.625 kHz (DEFAULT)
001 781.25 kHz
010 1.5625 MHz
011 3.125 MHz

Example:

VCNL4010 Sensor();  // Instantiate class    
...    
Sensor.setProximityFreq(2);  // set frequency to 1.5625MHz

Clone this wiki locally