I have a question about reading data from mpl3115s2 pressure/altitude sensor. I need to reading data once a minute and I have already chosen the standby mode. I use the following settings:
at start :
set oversampling as 128 in control register 1
set tdfe, drem and pdfe bits in ptDataCfg register
at reading time:
set reference pressure in BAR_IN register
set bit alt in ctrl1 as 1 or 0 depends on altitude or pressure mode
wait 10ms (I don't know if is it necessary)
set ost bit in ctrl1 register
waits for ost bit clearing in loop
waits for ptdr bit in status register
reads 3 bits from pressure out register
converts it into float
I repeat reading operations for pressure and altitude.
Should I chose my approach? I ask because my measurements are usually correct but not always. Sometimes altitude is
65520.000000 or something like this.
Thanks for all answers.
Best regards. Wojciech Jasiewicz.