Skip to content

setLEDmA()

Arnd edited this page Jan 1, 2017 · 2 revisions

SetLEDmA([milliamps])

Proximity is measured with an IR transmitter and receiver pair on the VCNL4010. The range and accuracy of the proximity readings is dependent upon the power put into the IR transmitter but overall device power consumption goes up as well. The default power setting is 20mA and can range from 0mA up to a maximum of 200mA in discrete steps of 20mA. The value passed in as a parameter is rounded down to the closest valid internal value.


Example:

VCNL4010 Sensor();      // Instantiate class    
...    
while(!Sensor.begin()); // loop until initialized
Sensor.setLEDmA(70);    // gets rounded down to a setting of 60mA

Clone this wiki locally