VL53L1X
Posted: Sun Dec 27, 2020 10:51 am
I'm trying to get any reasonable answer from the device.
The wiring is:
VCC to 3.3 V
GND to GND
SCL to D1 and 1K Pullup to VCC
SDA to D2 and 1K Pullup to VCC
I also have tried to switch the wiring between D1 and D2, but no better result.
At the moment all I want is, to receive an answer at the correct address which should be 41 or 0x29.
But I get no result.
I tried it with two different items.
One I bought here: https://www.ebay.de/itm/173662310935 the other one at:
https://eckstein-shop.de/GY-53L1-Laser- ... gK_DfD_BwE
They look different and behave different. With the first one I don't get a reaction to any address, while with the second one I get random addresses as result.
The actual code is:
#include <Wire.h>
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println("Start");
Serial.println("****** I2C-Scanner *****");
Serial.println("\nStart Scan (400 kHz) ... ");
Wire.begin();
Wire.setClock(400000L);
}
void loop()
{
//Serial.println();
for (byte I2CAdd = 1; I2CAdd < 128; I2CAdd++)
{
Wire.beginTransmission(I2CAdd);
byte fehler = Wire.endTransmission();
if (fehler == 0)
{
Serial.print("Chip with address ");
Serial.print(I2CAdd);
Serial.println(" found!");
}
}
}
I would be glad for any propositions.
The wiring is:
VCC to 3.3 V
GND to GND
SCL to D1 and 1K Pullup to VCC
SDA to D2 and 1K Pullup to VCC
I also have tried to switch the wiring between D1 and D2, but no better result.
At the moment all I want is, to receive an answer at the correct address which should be 41 or 0x29.
But I get no result.
I tried it with two different items.
One I bought here: https://www.ebay.de/itm/173662310935 the other one at:
https://eckstein-shop.de/GY-53L1-Laser- ... gK_DfD_BwE
They look different and behave different. With the first one I don't get a reaction to any address, while with the second one I get random addresses as result.
The actual code is:
#include <Wire.h>
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println("Start");
Serial.println("****** I2C-Scanner *****");
Serial.println("\nStart Scan (400 kHz) ... ");
Wire.begin();
Wire.setClock(400000L);
}
void loop()
{
//Serial.println();
for (byte I2CAdd = 1; I2CAdd < 128; I2CAdd++)
{
Wire.beginTransmission(I2CAdd);
byte fehler = Wire.endTransmission();
if (fehler == 0)
{
Serial.print("Chip with address ");
Serial.print(I2CAdd);
Serial.println(" found!");
}
}
}
I would be glad for any propositions.