Liebe Alle!
Mein aktuelles Projekt stellt mich vor ein paar Herausforderungen.
Aktuell arbeite ich das erste Mal mit einem Sensor, der über I2C angeschlossen wird. Genau genommen mit diesem hier: Time-of-Flight-Sensor.
Ich scheitere nun an der nötigen Adresse für die eigentliche Programmierarbeit.
Hardware
Fotos der Hardware findet ihr im Anhang. Die Anschlüsse habe ich wie folgt vorgenommen:
Sensorseite ----Raspberry Pi
VIN ----- PIN1 (board)
GND ----PIN6
SDA ----PIN3
SCL ----PIN5
XSHUT----PIN16
Software
Ich habe bereits im raspi-config i2c-Interfaces aktiviert und die i2c-tools und python-smbus installiert.
Die Ausgabe von
i2cdetect -y 1
lautet jedoch
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
obwohl alles angeschlossen ist. Folgendes an der Produktbeschreibung hat mich außerdem aufhorchen lassen:
QuoteThe sensor’s 7-bit slave address defaults to 0101001b on power-up. It can be changed to any other value by writing one of the device configuration registers, but the new address only applies until the sensor is reset or powered off. ST provides an application note (196k pdf) that describes how to use multiple VL53L0X sensors on the same I²C bus by individually bringing each sensor out of reset and assigning it a unique address, and the approach can be easily adapted to apply to the VL53L1X instead
.Wieso kann ich den ToF-Sensor im i2cdetect nicht sehen? Habe ich etwas falsch verkabelt? Oder liegt es an der default-adresse? und wie könnte ich diese ansteuern, wo sie doch ein anderes Format hat als die Ausgabe im i2cdetect?
Vielen Dank schon einmal, wenn ihr durchgehalten habt, bis hierhin zu lesen! Vielleicht habt ihr ja eine Idee!
LG,
Himmelbeere