Hi,
do you think it's possible to put the XSHUT pin of a VL53L3CX to 3.3V (so it's always on)?
I'm using an ESP 32 and using the STM32duino VL53L3CX library (with a wrapper).
My code works if I control XSHUT, but not if I don't
thank you!
Vl53lxWrapper.cpp (1.6 KB)
Vl53lxWrapper.h (571 Bytes)
#include <Arduino.h>
#include <Wire.h>
#include "Vl53lxWrapper.h"
int xshutPin = 7;
int interruptPin = 6;
int sdaPin = 8;
int sclPin = 9;
//Distance
Vl53lxWrapper *vl53lxWrapper;
int sensorDeviceAddress = 0x12;
int distance;
int distsanceMin = 300; //distance min pour détecter une presence
bool measureDistance = false;
void setup()
{
Serial.begin(115200);
//IR et distance
vl53lxWrapper = new Vl53lxWrapper(xshutPin,
interruptPin,
sensorDeviceAddress,
sdaPin,
sclPin);
}
void loop()
{
VL53LX_MultiRangingData_t measurement = vl53lxWrapper->getLatestMeasurement();
distance = measurement.RangeData->RangeMilliMeter;
Serial.println(distance);
delay(500);
}