EvoTOF#

class EvoTOF(channel, i2c=I2CA, address=0x29, io_timeout_ms=300, auto_init=True)#

Time-of-flight distance sensor driver for a VL53L0X-compatible sensor.

setTimeout(timeout_ms)#

Set the sensor I/O timeout in milliseconds.

Returns:

None.

timeoutOccurred()#

Read and clear the timeout flag.

Returns:

Boolean.

isInitialized()#

Check whether initialisation completed.

Returns:

Boolean.

getModelId()#
getRevisionId()#

Read the model or revision identification register.

Returns:

Integer register value.

setAddress(new_address)#

Change the sensor I2C address used by the driver.

Returns:

None.

setSignalRateLimit(limit_mcps)#

Set the signal rate limit in mega counts per second.

Returns:

True when the limit was accepted, otherwise False.

getSignalRateLimit()#

Read the configured signal rate limit.

Returns:

Floating-point MCPS value.

init(io_2v8=True)#

Initialise sensor registers and calibration.

Returns:

True on success, otherwise False.

readRangeSingleMillimeters()#
readRangeContinuousMillimeters()#

Read distance in millimeters using single-shot or continuous mode.

Returns:

Integer distance in millimeters, or 65535 on timeout/failure.

read_mm()#
getDistance()#
distance()#

Read distance with timeout sentinel converted to Python None.

Returns:

Integer distance in millimeters, or None.

startContinuous(period_ms=0)#

Start continuous ranging.

Returns:

True on success, otherwise False.

stopContinuous()#

Stop continuous ranging.

Returns:

None.

readContinuousMM()#

Read a continuous-mode distance sample.

Returns:

Integer distance in millimeters, or None.

debug()#

Return key diagnostic values from the driver and device registers.

Returns:

Dictionary.

getMeasurementTimingBudget()#

Read the active timing budget.

Returns:

Timing budget in microseconds.

setMeasurementTimingBudget(budget_us)#

Set the timing budget.

Returns:

True when the budget could be applied, otherwise False.

getVcselPulsePeriod(period_type)#

Read the pre-range or final-range VCSEL pulse period.

Returns:

Pulse period in PCLKs, or 255 for an invalid type.

setVcselPulsePeriod(period_type, period_pclks)#

Set the pre-range or final-range VCSEL pulse period.

Returns:

True on success, otherwise False.