added some comments to clarify things
This commit is contained in:
+4
-3
@@ -35,7 +35,8 @@ int8_t check_file_exists(const char *filename)
|
||||
|
||||
void user_delay_ms(uint32_t period)
|
||||
{
|
||||
usleep(period*1000);
|
||||
//usleep(period*1000); // if using gnu99
|
||||
sleep(period*1000); // if using c99
|
||||
}
|
||||
|
||||
#ifdef BME280_FLOAT_ENABLE
|
||||
@@ -231,8 +232,8 @@ int main(int argc, char* argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
dev.dev_id = BME280_I2C_ADDR_PRIM; //0x76
|
||||
//dev.dev_id = BME280_I2C_ADDR_SEC; //0x77
|
||||
//dev.dev_id = BME280_I2C_ADDR_PRIM; //0x76 (if orange/pin 5 is connected to ground on Pi)
|
||||
dev.dev_id = BME280_I2C_ADDR_SEC; //0x77 (if orange/pin 5 is connected to 3.3V on Pi)
|
||||
dev.intf = BME280_I2C_INTF;
|
||||
dev.read = user_i2c_read;
|
||||
dev.write = user_i2c_write;
|
||||
|
||||
Reference in New Issue
Block a user