32 #define SEN13680_DEFAULT_ADDRESS 0x62 73 uint64_t now_us =
micros();
74 static uint64_t last_update_time_us = 0;
77 if (now_us > last_update_time_us + 10000)
80 last_update_time_us = now_us;
81 uint8_t read_buffer[2] = {100,100};
90 distance = (float)((int16_t)(read_buffer[0] << 8) + read_buffer[1])/100.0;
#define SEN13680_DEFAULT_ADDRESS
bool i2cRead(uint8_t addr_, uint8_t reg_, uint8_t len, uint8_t *buf)
volatile uint64_t micros(void)
bool i2cWrite(uint8_t addr_, uint8_t reg_, uint8_t data)