Hi @BSTRobin,
Thanks for your reply.
However I think there's still a misunderstanding about what I am trying to do so I'll try again.
I've written a piece of software that communicates over SPI with Arduino where the Bosch Sensortec library is used to read sensor data.
The arduino side of things reads the calibration data (as recommended in the documentation), sets the sensor mode to normal and starts
reading sensor data.
Since the data is used on the arduino side feed into the compensation methods of the BStec libraries I wanted to know what data
I can provide in the calibration data such that when the sensor data is read and the software is reporting something like 0x789AB (20 bits in 16.4 format)
the resulting value would be something that represents the top of the range of the temperature sensor, resulting in something like 75.12 *C.
To be clear I am not trying to reimplement the hardware, rather allow users to add this component to a simulator like Tinkercad for whatever project they are building.
I hope this helps clarify my query.
Cheers,
Bonny
Hi bonnyr,
The temperature data obtained from the BME280 sensor API can be considered as raw data, and then you can perform the format conversion you need.
Hi @BSTRobin
I am not sure why we are going in circles...
I am trying to produce these raw values so that a user software, using the BST library can read these over SPI and coupled with the coefficients, get the compensated values
So for example, what should I put in the 24bit of the temperature registers so that when a client reads that they can convert to a real temperature?
So if I wanted to generate the raw values for:
Temperature. Register Values (FA, FB, FC)
20*C ? ? ?
25*C ? ? ?
-15*C ? ? ?
-2.5C ? ? ?
I know you'd say these depend on the coefficients, but given a set of coefficients what are the register values for the above temperatures?
Alternatively, is there a way to program the coefficients for test purposes so that they simply are ignored (identity)?
for example, if I used 0x1000 with those coefficients, the resulting temperature would be 40.96*C?