firsttitanrobotics3767 / 2024-Robot

Other
2 stars 0 forks source link

VL53L4CD I2C Register Reference #21

Open CH-FRC3767 opened 7 months ago

CH-FRC3767 commented 7 months ago
#define VL53L4CD_SOFT_RESET     ((uint16_t)0x0000))
#define VL53L4CD_I2C_SLAVE_DEVICE_ADDRESS      ((uint16_t)0x0001)
#define VL53L4CD_VHV_CONFIG_TIMEOUT_MACROP_LOOP_BOUND  ((uint16_t)0x0008)
#define VL53L4CD_XTALK_PLANE_OFFSET_KCPS ((uint16_t)0x0016)
#define VL53L4CD_XTALK_X_PLANE_GRADIENT_KCPS     ((uint16_t)0x0018)
#define VL53L4CD_XTALK_Y_PLANE_GRADIENT_KCPS     ((uint16_t)0x001A)
#define VL53L4CD_RANGE_OFFSET_MM     ((uint16_t)0x001E)
#define VL53L4CD_INNER_OFFSET_MM     ((uint16_t)0x0020)
#define VL53L4CD_OUTER_OFFSET_MM     ((uint16_t)0x0022)
#define VL53L4CD_I2C_FAST_MODE_PLUS     ((uint16_t)0x002D)
#define VL53L4CD_GPIO_HV_MUX_CTRL      ((uint16_t)0x0030)
#define VL53L4CD_GPIO_TIO_HV_STATUS    ((uint16_t)0x0031)
#define VL53L4CD_SYSTEM_INTERRUPT  ((uint16_t)0x0046)
#define VL53L4CD_RANGE_CONFIG_A     ((uint16_t)0x005E)
#define VL53L4CD_RANGE_CONFIG_B      ((uint16_t)0x0061)
#define VL53L4CD_RANGE_CONFIG_SIGMA_THRESH     ((uint16_t)0x0064)
#define VL53L4CD_MIN_COUNT_RATE_RTN_LIMIT_MCPS    ((uint16_t)0x0066)
#define VL53L4CD_INTERMEASUREMENT_MS ((uint16_t)0x006C)
#define VL53L4CD_THRESH_HIGH    ((uint16_t)0x0072)
#define VL53L4CD_THRESH_LOW     ((uint16_t)0x0074)
#define VL53L4CD_SYSTEM_INTERRUPT_CLEAR        ((uint16_t)0x0086)
#define VL53L4CD_SYSTEM_START     ((uint16_t)0x0087)
#define VL53L4CD_RESULT_RANGE_STATUS   ((uint16_t)0x0089)
#define VL53L4CD_RESULT_SPAD_NB   ((uint16_t)0x008C)
#define VL53L4CD_RESULT_SIGNAL_RATE   ((uint16_t)0x008E)
#define VL53L4CD_RESULT_AMBIENT_RATE   ((uint16_t)0x0090)
#define VL53L4CD_RESULT_SIGMA   ((uint16_t)0x0092)
#define VL53L4CD_RESULT_DISTANCE   ((uint16_t)0x0096)

#define VL53L4CD_RESULT_OSC_CALIBRATE_VAL      ((uint16_t)0x00DE)
#define VL53L4CD_FIRMWARE_SYSTEM_STATUS        ((uint16_t)0x00E5)
#define VL53L4CD_IDENTIFICATION_MODEL_ID       ((uint16_t)0x010F)
davidpolito commented 7 months ago

https://gist.github.com/jeremycole/24a622d8c4360e4f599db0739c58fb00

sample code

davidpolito commented 7 months ago

https://01509530127781966272.googlegroups.com/attach/25fd3b3d66b44/Vl53L0X_Declares.java?part=0.1&view=1&vt=ANaJVrHDU8WXNtv91Dt29RT4sNzoyxj12PeB9LbZNdrdB5eC9kyKYzQukTALaRvUXNxgJ5MoGANdtWQN0FlHdU7TKAqWyghMX2llEUItnHqa7kfjKFKkVF8

https://01509530127781966272.googlegroups.com/attach/25fd3b3d66b44/VL53L0X.java?part=0.2&view=1&vt=ANaJVrHp10gWEbXfJZV_cLsMGuVXt6xqR59l4w26jdpUjfT1rFevXuauV2HGb6Anyg8PMvGwqM53iN_pYHA7uGzmiF1-eOUdnYx9UiOkdfgj_p2c3Ax6Dxk

https://01509530127781966272.googlegroups.com/attach/25fd3b3d66b44/VL53L0X_simple.java?part=0.3&view=1&vt=ANaJVrGTRvmJFi3MsejQvMPueGIRIu7Nt9LhIpMXtF4G6D5asnrbamPTUwvzVNl3wzYjKc_P9oMh6s7t0PxQwyYfweKozWjk5XdVfWsHh8NOhMLHMEBlEE0

OverlandCrib959 commented 7 months ago

I2c code for pi need a little work but the outline should be right. https://pi4j.com/examples/jbang/bme280_temperature_humidity_pressure/