Main Content
readProximity
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
Description
[
returns one reading of the proximity value with the proximity
,timestamp
] = readProximity(apds9960obj
)timestamp
.
Timestamp
argument is optional.
Examples
Read Proximity from Sensor
Create an Arduino object.
arduinoobj = arduino('COM4', 'Nano33BLE', 'Libraries', 'APDS9960');
Create the sensor object for the sensor in use.
apds9960obj = apds9960(arduinoobj)
Return one sample of the proximity data.
proximReadings = readProximity(apds9960obj)
proximReadings = 0.9647
Input Arguments
Output Arguments
Version History
Introduced in R2021b