0

I'm trying to read temperature data from BMP180 using my BLE112 via I2C. The problem is that what get in the very end are some unrelevant numbers. I think i am missing something extremely important. I follow BMP180 datasheet point by point. Program that i have is wrote in BGScript from Bluegiga

There are few things that are strange in my opinion:

  • measuring raw temperature (even though is not correct) sometimes gives 0.. So how slow is this programmable I2C?

  • http://www.sureshjoshi.com/embedded/ble112-how-to-use-i2c/ Suresh Joshi writes here that register i should write and read in is the one from datasheet left shifted once. Is it necessary also in my case?

  • can someone verify these staps of algorithm:

a) reading calibrations: call hardware_i2c_read(238,0,"\xaa")(result,data_len,sensor(0:22)) - should i write something before?

b) write 0x2E into reg 0xF4 should it be : call hardware_i2c_write(238,1,2,"\xf4\x2e")(written) ?

c) read reg 0xF6(MSB) and 0xF7(LSB) should it be call hardware_i2c_read(239,0,"\xf6")(result,data_len, MSB) and call hardware_i2c_read(239,0,"\xf7")(result,data_len,LSB)

I am struggling so hard so if anyone could tell me what is wrong or if i can't use this sensor with this BLE module please tell me! (:

My .bgs file : http://pastebin.com/3zHVdNrT

BR Bartek

SJoshi
  • 1,866
  • 24
  • 47
  • Hi, I wrote the article you linked to in the question. Could you also include a link to the datasheet you're using? I might be able to help. – SJoshi Jan 15 '15 at 15:23
  • Hello :). Sorry for so long response. I talked to Jeff Rowberg regarding this problem. It came out that sensor like BMP180 uses 64 bit values to do some calculations regarding temperature/pressure. Therfore i will not be able to calculate it and send directly to GATT. So i changed my sensor to TMP102 which works great :). Thank you for response and for your great blog. It cleared my mind few times when i started to develope with BLE112 :). Keep it going. BTW do you have any plans to do with BLE? – user3742345 Feb 01 '15 at 10:06
  • No problem :) You should still be able to do 64 bit calcs, but just a lot trickier. – SJoshi Feb 03 '15 at 21:40
  • If you came up with an answer to this, please consider posting it for future reference? – SJoshi Jul 08 '15 at 04:35

0 Answers0