-
Notifications
You must be signed in to change notification settings - Fork 1
Class Instantiation
Arnd edited this page Dec 11, 2020
·
2 revisions
The VCNL4010 class instantiation has no parameters required for instantiation. The I2C device address for the device is hard-coded and cannot be changed. The device itself isn't initialized until the begin() method is called.
VCNL4010 Sensor(); // Instantiate class
...
while (!Sensor.begin()) { // Loop until sensor found
Serial.println("Error, unable to find or identify VCNL4010."); // Show error message
delay(5000); // Wait 5 seconds before retrying
} // of if-then we can't initialize or find the device
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
