MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
Loading...
Searching...
No Matches
MiniR4_MXLaserV2.h File Reference

A library for interfacing with the MATRIX Laser V2 ToF sensor via I2C. More...

#include <Arduino.h>
#include <Wire.h>

Go to the source code of this file.

Classes

class  MatrixLaserV2
 A class for MATRIX Laser V2 ToF sensor. More...
 

Macros

#define ADDR_PCA954X   0x70
 
#define ADDRESS_DEFAULT   0b0101001
 
#define startTimeout()
 
#define checkTimeoutExpired()
 
#define decodeVcselPeriod(reg_val)
 
#define encodeVcselPeriod(period_pclks)
 
#define calcMacroPeriod(vcsel_period_pclks)
 

Detailed Description

A library for interfacing with the MATRIX Laser V2 ToF sensor via I2C.

This class allows reading distance data from the MXLaserV2 sensor. Based on: https://github.com/pololu/vl53l0x-arduino Add: Merge into MiniR4.I2C instance.

Author
MATRIX Robotics
Version
1.0
Date
2024 @license MIT License

Definition in file MiniR4_MXLaserV2.h.

Macro Definition Documentation

◆ ADDR_PCA954X

#define ADDR_PCA954X   0x70

Definition at line 21 of file MiniR4_MXLaserV2.h.

◆ ADDRESS_DEFAULT

#define ADDRESS_DEFAULT   0b0101001

Definition at line 28 of file MiniR4_MXLaserV2.h.

◆ calcMacroPeriod

#define calcMacroPeriod ( vcsel_period_pclks)
Value:
((((uint32_t)2304 * (vcsel_period_pclks) * 1655) + 500) / 1000)

Definition at line 48 of file MiniR4_MXLaserV2.h.

◆ checkTimeoutExpired

#define checkTimeoutExpired ( )
Value:
(io_timeout > 0 && ((uint16_t)(millis() - timeout_start_ms) > io_timeout))

Definition at line 34 of file MiniR4_MXLaserV2.h.

◆ decodeVcselPeriod

#define decodeVcselPeriod ( reg_val)
Value:
(((reg_val) + 1) << 1)

Definition at line 39 of file MiniR4_MXLaserV2.h.

◆ encodeVcselPeriod

#define encodeVcselPeriod ( period_pclks)
Value:
(((period_pclks) >> 1) - 1)

Definition at line 43 of file MiniR4_MXLaserV2.h.

◆ startTimeout

#define startTimeout ( )
Value:
(timeout_start_ms = millis())

Definition at line 31 of file MiniR4_MXLaserV2.h.