
21. High-level API Reference
21.3. RangeFinder function interface
The Yoctopuce class YRangeFinder allows you to use and configure Yoctopuce range finder sensors. It
inherits from the YSensor class the core functions to read measurements, register callback functions,
access the autonomous datalogger. This class adds the ability to easily perform a one-point linear
calibration to compensate the effect of a glass or filter placed in front of the sensor.
In order to use the functions described here, you should include:
js
<script type='text/javascript' src='yocto_rangefinder.js'></script>
cpp
#include "yocto_rangefinder.h"
m
#import "yocto_rangefinder.h"
pas
uses yocto_rangefinder;
vb
yocto_rangefinder.vb
cs
yocto_rangefinder.cs
java
import com.yoctopuce.YoctoAPI.YRangeFinder;
uwp
import com.yoctopuce.YoctoAPI.YRangeFinder;
py
from yocto_rangefinder import *
php
require_once('yocto_rangefinder.php');
es
in HTML: <script src="../../lib/yocto_rangefinder.js"></script>
in node.js: require('yoctolib-es2017/yocto_rangefinder.js');
Global functions
func
)
Retrieves a range finder for a given identifier.
yctx
,
func
)
Retrieves a range finder for a given identifier in a YAPI context.
Starts the enumeration of range finders currently accessible.
yctx
)
Starts the enumeration of range finders currently accessible.
YRangeFinder
methods
rawValues
,
refValues
)
Configures error correction data points, in particular to compensate for a possible perturbation of the measure
caused by an enclosure.
cancelCoverGlassCalibrations()
Cancels the effect of previous hardware calibration procedures to compensate for cover glass, and restores
factory settings.
Invalidates the cache.
describe()
Returns a short text that describes unambiguously the instance of the range finder in the form
TYPE(NAME)=SERIAL.FUNCTIONID
.
Returns the current value of the range finder (no more than 6 characters).
Returns the uncalibrated, unrounded raw value returned by the sensor, in mm, as a floating point number.
Returns the current sensor temperature, as a floating point number.
www.yoctopuce.com
229
Summary of Contents for Yocto-RangeFinder
Page 1: ...Yocto RangeFinder User s guide...
Page 2: ......
Page 18: ...12 www yoctopuce com...
Page 26: ...20 www yoctopuce com...
Page 42: ...36 www yoctopuce com...
Page 70: ...gcc lyocto lm lpthread lusb 1 0 lstdc 10 Using Yocto RangeFinder with C 64 www yoctopuce com...
Page 90: ...84 www yoctopuce com...
Page 120: ...114 www yoctopuce com...
Page 130: ...124 www yoctopuce com...
Page 484: ...478 www yoctopuce com...
Page 488: ...482 www yoctopuce com...
Page 490: ...23 Characteristics 484 www yoctopuce com...
Page 491: ......
Page 492: ......