Open bluepup opened 3 years ago
yes, the id is a sample ID. I did not know that the BME280 has a device id - that would be a useful addition
the chip-ID is not a serial number, it is merely a hint to the type of chip.
The datasheet says:
but useful anyways.
I just started using this repo for reading BME280 data. Thanks for making it available. I chose this repo due to it looked like there was a unique id for each BME280. As mentioned by @bluepup who was also looking for a unique id but the uuid is created randomly on each read. So in doing some Googling there is an undocumented id for the sensors in registers offset 0x83 through 0x86. Here's the link I found: [https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/Unique-IDs-in-Bosch-Sensors/td-p/6012. The article includes the formula for getting the id. I wrote it in python but included the code in my main program... I'm still testing it. I will submit a pull request with the code added to your code so that it will be an object included with temperature, pressure, RHG, etc. Hopefully, this will be used by others.
Please note in the documentation, that the ID is not the chip-id.
From the sample I was assuming that the id was the chip-ID, using it as a key in my database. In fact it is a UUID that changes with every read of a sample.
I know that it was my assumption that was flawed, no real error in the code. But the bme280 has a id that you can read via i2c (not implemented) which mislead me.