Barometer in CC2650

Discuss mobile apps for Texas Instruments products.
goldbaer
Posts: 1
Joined: 17:28, 18 Jun 2015

Barometer in CC2650

Postby goldbaer » 17:40, 18 Jun 2015

Hi there,
since I am programming a Tablet based weather station I needed the Barometer values and was wondering why I was getting values like "0.98665" or something like that..

In the Texas Instruments Support Forum I found this answer:
https://e2e.ti.com/support/wireless_con ... 51#1526551

After commenting the code provided and adding two lines of Code, my Tests provides the same readout values as the iOs TI Sensor-Tag App.



Can someone confirm the changes?

Code: Select all


//changed in tisensortag-ble-cc2650.js
instance.getBarometerValues = function (data)
        {
            //var p = evothings.util.littleEndianToUint16(data, 2)

            // Extraction of pressure value, based on sfloatExp2ToDouble from
            // BLEUtility.m in Texas Instruments TI BLE SensorTag iOS app
            // source code.
            // TODO: Move to util.js
            //var mantissa = p & 0x0FFF
            //var exponent = p >> 12

            //magnitude = Math.pow(2, exponent)
            //output = (mantissa * magnitude)

            //var pInterpreted = output / 10000.0

            //CHANGES MADE HERE
            rawP = (data[5] << 16) + (data[4] << 8) +  data[3];
            pInterpreted = rawP / 100.0;

            return {pressure: pInterpreted}
        }
       

ardiri
Posts: 58
Joined: 16:13, 28 May 2014

Re: Barometer in CC2650

Postby ardiri » 02:09, 09 Jul 2015

this looks correct.
will synchronise with the team and see if we can validate the changes and update our examples accordingly.
// Aaron
Chief Technology Officer
Evothings AB http://www.evothings.com/

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: Barometer in CC2650

Postby micke » 13:19, 09 Jul 2015

Thanks a lot for reporting! Opened an issue for this bug here: https://github.com/evothings/evothings- ... issues/161
Best regards, Mikael

Barrett
Posts: 8
Joined: 19:28, 23 Sep 2015

Re: Barometer in CC2650

Postby Barrett » 19:43, 23 Sep 2015

Great! Thank you.


Return to “Texas Instruments”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest