bmp180 reading of values

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
ftrueck
Posts: 41
Joined: 24 Dec 2015 23:46

bmp180 reading of values

Post by ftrueck »

Hi, I've tried to enhance the example of bmp180 to send its values to the zwave controller.
The problem is: I do not understand the values which are sent to my razberry.

e.g.: Temperature is always 0, pressure is 234.
The values should be: 23 for temp and 1024 for pressure (including compensation for altitude)

Normally the bmp will report pressure related to sealevel. Thats ok for me but this pressure would not be 234.

Here my current code (also with other devices):

Code: Select all

#include "ZUNO_DHT.h"
#include "ZUNO_BMP180.h"
#include "Wire.h"

#define BH1750_I2CADDR 0x23
#define BH1750_CONTINUOUS_HIGH_RES_MODE  0x10

DHT    dht22_sensor(11, DHT22);
ZUNO_BMP180 bmp;

// set up channel
ZUNO_SETUP_CHANNELS(
  ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, 
                          SENSOR_MULTILEVEL_SCALE_CELSIUS, 
                          SENSOR_MULTILEVEL_SIZE_TWO_BYTES, 
                          SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS,
                          getterTemp),
  ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_RELATIVE_HUMIDITY, 
                          SENSOR_MULTILEVEL_SCALE_PERCENTAGE_VALUE, 
                          SENSOR_MULTILEVEL_SIZE_TWO_BYTES, 
                          SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS,
                          getterHumid),
  ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_BAROMETRIC_PRESSURE, 
                          SENSOR_MULTILEVEL_SCALE_KILO_PASCAL, 
                          SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, 
                          SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS,
                          getterPressure),
  ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, 
                          SENSOR_MULTILEVEL_SCALE_CELSIUS, 
                          SENSOR_MULTILEVEL_SIZE_TWO_BYTES, 
                          SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS,
                          getterTemp2),
  ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_LUMINANCE,
                          SENSOR_MULTILEVEL_SCALE_LUX,  
                          SENSOR_MULTILEVEL_SIZE_TWO_BYTES, 
                          SENSOR_MULTILEVEL_PRECISION_ZERO_DECIMALS, 
                          getterLight)
);

ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_SLEEPING);

float temp, humid, temp2;
int32_t pressure;
word lightLux;

void setup() {
  Wire.begin();
  Wire.beginTransmission(BH1750_I2CADDR);
  Wire.write(BH1750_CONTINUOUS_HIGH_RES_MODE);
  Wire.endTransmission();
}

void loop() {
  dht22_sensor.begin();
  delay(10);
  dht22_sensor.read(true); 
  delay(10);
  temp = dht22_sensor.readTemperature() * 100;
  humid = dht22_sensor.readHumidity() * 100;

  bmp.begin();
  temp2 = bmp.readTemperature();
  pressure = bmp.readPressure() * 100;

  lightLux = readLightLevel();
  
  zunoSendReport(1);
  zunoSendReport(2);
  zunoSendReport(3);
  zunoSendReport(4);
  zunoSendReport(5);
  zunoSendReport(6);
  
  zunoSendDeviceToSleep();
}

word readLightLevel() {
  word level;

  Wire.begin();
  Wire.beginTransmission(BH1750_I2CADDR);
  Wire.requestFrom(BH1750_I2CADDR, 2);
  
  level = Wire.read() << 8;
  level += Wire.read();

  Wire.endTransmission();

  level = level / 1.2; // convert to lux

  return level;
}

word getterTemp() {
  return temp;
}

word getterHumid() {
  return humid;
}

word getterTemp2() {
  return temp2;
}

DWORD getterPressure() {
  return pressure;
}

word getterLight() {
  return lightLux;
}
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: bmp180 reading of values

Post by A.Harrenberg »

Hi,

I think that you mixed up the units here ...

From the specification of the BMP180:
Resolution of output data pressure 0.01 hPa
This means the BMP reports in 100 times hpa, the value reported is e.g. 99530 (in 0.01 hpa units)

To convert that to hpa (equal to mbar) you would need to divide by 100, but the value to be reported is in kpa, therefore are division by 1000 is needed.

You will report with two decimals, so the value to be reported should be 100 times the kpa value -> you need to divide by 10 instead of multiplying with 100 in code.

For the temperature I only report with 1 decimal, so I multiply the received value by 10, you report with two decimal, so you need to multiply with 100 here...

I use this in my code:

Code: Select all

word  lastTempBMP180;
word  lastPressureBMP180;
...
lastTempBMP180      = bmp.readTemperature()*10;
lastPressureBMP180  = bmp.readPressure()/10; 
and

Code: Select all

long getterPressure() {
  return lastPressureBMP180;
}
word getterTempBMP180() {
  return lastTempBMP180;
}
So if you change these parts in your code it should work fine.

Another thing is, I also noticed that you have the bmp.begin() inside the loop() function where my bmp.begin() is in the setup(). I am not quite sure if you need to initialize it every time, but you are using sleep mode which I don't use at the moment.

Regards,
Andreas.
fhem.de - ZWave development support
ftrueck
Posts: 41
Joined: 24 Dec 2015 23:46

Re: bmp180 reading of values

Post by ftrueck »

Hi, thanks for the fast reply.
I've moved the begin commands to setup function with no change, so it should work this way also.

I've changed my code according to your suggestions and now I get 0,2kpa as value in my razberry UI. Temperature still is 0°C.
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: bmp180 reading of values

Post by A.Harrenberg »

Hi,

that is strange...

I have some serial debugging info in my code like this, you might want to include it in your code as well to understand what is going on...

Code: Select all

#define DEBUG
#define DEBUG_BMP180
...

void setup() {

  #ifdef DEBUG
    Serial.begin();
    Serial.println("start");
  #endif
...
}

...

  #ifdef DEBUG
    #ifdef DEBUG_BMP180
      Serial.println("readBMP180");
  //    bmp.dumpInternal();
  //    Serial.println(bmp.readRawTemperature());
      
      Serial.print("BMP 180: Temperatur: ");
      Serial.print(lastTempBMP180/10.0);
      Serial.print(" C, Druck: ");
      Serial.print(lastPressureBMP180/100.0);
      Serial.println(" kpa");
    #endif
  #endif

Here is my full sketch so you can understand better where the above code is located, but there a few other sensors as well as the OLED added.

Code: Select all

// V2.0

/*
 * This is based on the Simple Multilevel Dimmer example,
 * the dht22_test example, the Simple MultiSensor example
 * and the 1-wire DS18B20 example...
 * It gives you the ability to control the
 * built in LED brightness via Z-Wave commands
 * It should report values from the DHT11 sensor on the multisensor channnel
 */

#include "ZUNO_DHT.h"
#include "Wire.h"
#include "ZUNO_BMP180.h"
#include "ZUNO_DS18B20.h"
#include "ZUNO_OLED_I2C.h"

#define DEBUG
#define DEBUG_BMP180
//#define DEBUG_DS18B20

// HW declaration

// use pin 11 for DHT sensor
DHT           dht11_sensor(11, DHT11);
ZUNO_BMP180   bmp;
OLED          oled;

#define LUMINANCE_PIN    6
#define SWITCH_LED_PIN   9
#define MOTION_LED_PIN  10
#define MOTION_PIN      12
#define LED_PIN         13
#define SCL_PIN         14
#define SDA_PIN         15
#define PIN_DS18B20     16

OneWire       ow(PIN_DS18B20);
DS18B20Sensor ds1820(&ow);
I2CDriver alternative_I2C(SCL_PIN, SDA_PIN); 

boolean InitDone = false;

byte  lastSetDimmer       = 0;      // variable to store current dimmer value
float temperature         = -99.0;  // variable to store the temperature
float humidity            = -99.0;  // variable to store the humidity
byte  currentLEDValue     = 0;      // variables to store the current switch state
byte  lastLuminanceValue  = 0;      // variable to store the last luminance
byte  lastMotionValue     = 0;      // motion
word  lastTempBMP180      = 1990;   // variable to store the temperature from the BMP180, precision is 1 digit -> 199.0 C as default value
word  lastPressureBMP180  = 0;      // variable to store the pressure from the BMP180
int   lastTempDS18B20     = 0;      // variable to store the temperature from the DS18B20

byte addrDS18B20[8] = {0x28, 0x8c, 0xde, 0x26, 0x00, 0x00, 0x80, 0x80}; // static address of "my" DS18B20
  
// timer values
#define T_REPORT      30000
#define T_READANALOG  500
unsigned long WaitMillis_tReport;
unsigned long WaitMillis_tReadAnalog;

// set up the Z-Uno channels
// definition converted to "one" line to get warnings/error reported with correct line numbers
// CH1 - Dimmer:      ZUNO_SWITCH_MULTILEVEL(getterDim, setterDim)
// CH2 - Temperature: ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE,SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL, getterTemp)
// CH3 - Humidity:    ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_RELATIVE_HUMIDITY, SENSOR_MULTILEVEL_SCALE_PERCENTAGE_VALUE, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL, getterHum)
// CH4 - Luminance:   ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_LUMINANCE, SENSOR_MULTILEVEL_SCALE_PERCENTAGE_VALUE, SENSOR_MULTILEVEL_SIZE_ONE_BYTE, SENSOR_MULTILEVEL_PRECISION_ZERO_DECIMALS, getterLum)
// CH5 - Motion:      ZUNO_SENSOR_BINARY(ZUNO_SENSOR_BINARY_TYPE_MOTION, getterMotion)
// CH6 - Switch:      ZUNO_SWITCH_BINARY(getterSwitch, setterSwitch)
// CH7 - TempBMP180:  ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE,SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL, getterTempBMP180)
// CH8 - Pressure:    ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_ATMOSPHERIC_PRESSURE,SENSOR_MULTILEVEL_SCALE_KILOPASCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterPressure)
// CH9 - TempDS18B20: ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE,SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTempDS18B20)
ZUNO_SETUP_CHANNELS(ZUNO_SWITCH_MULTILEVEL(getterDim, setterDim), ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE, SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL, getterTemp), ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_RELATIVE_HUMIDITY, SENSOR_MULTILEVEL_SCALE_PERCENTAGE_VALUE, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL, getterHum), ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_LUMINANCE, SENSOR_MULTILEVEL_SCALE_PERCENTAGE_VALUE, SENSOR_MULTILEVEL_SIZE_ONE_BYTE, SENSOR_MULTILEVEL_PRECISION_ZERO_DECIMALS, getterLum), ZUNO_SENSOR_BINARY(ZUNO_SENSOR_BINARY_TYPE_MOTION, getterMotion), ZUNO_SWITCH_BINARY(getterSwitch, setterSwitch), ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE,SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_ONE_DECIMAL, getterTempBMP180),ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_ATMOSPHERIC_PRESSURE,SENSOR_MULTILEVEL_SCALE_KILOPASCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterPressure), ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE,SENSOR_MULTILEVEL_SCALE_CELSIUS, SENSOR_MULTILEVEL_SIZE_TWO_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS, getterTempDS18B20));
ZUNO_SETUP_DEBUG_MODE(DEBUG_ON);

#define ZUNO_CHANNEL_DIMMER       1
#define ZUNO_CHANNEL_TEMP         2
#define ZUNO_CHANNEL_HUM          3
#define ZUNO_CHANNEL_LUM          4
#define ZUNO_CHANNEL_MOTION       5
#define ZUNO_CHANNEL_SWITCH       6
#define ZUNO_CHANNEL_TEMP_BMP180  7
#define ZUNO_CHANNEL_PRESSURE     8
#define ZUNO_CHANNEL_TEMPDS18B20  9





void setup() {

  #ifdef DEBUG
    Serial.begin();
    Serial.println("start");
  #endif
  
  pinMode(LUMINANCE_PIN,  INPUT);
  pinMode(LED_PIN,        OUTPUT);
  pinMode(SWITCH_LED_PIN, OUTPUT);
  pinMode(MOTION_LED_PIN, OUTPUT);
  pinMode(MOTION_PIN,     INPUT);

  Wire.bindDriver(&alternative_I2C); // This instructs to use other pins than default
  
  dht11_sensor.begin();
  bmp.begin(); // calls internally Wire.begin()
  //  ds1820.scanAloneSensor(addrDS18B20);  // static address defined 
  oled.begin();
  oled.clrscr();
}

void myInit() {
  // initial setup for timer values
  WaitMillis_tReport      = millis() + 5000;
  WaitMillis_tReadAnalog  = millis() + 5000;
}

void loop() {

  if (InitDone != true) {
    myInit();
    InitDone = true;
  }

  if ( (long)( millis() - WaitMillis_tReadAnalog ) >= 0) {
    // don't check in every loop...
    checkMotion();  // check motion sensor
    WaitMillis_tReadAnalog += T_READANALOG;  // set next timer value
  }

  // update values and send out reports
  if ( (long)( millis() - WaitMillis_tReport ) >= 0) {
    // Loop for reports with timer every T_REPORTS
    read_DHT();         // read values for CH1 / CH2
    readLuminance();    // read value for CH4
    readBMP180();       // read values for CH7 / CH8
    readDS18B20();      // read value for CH9
    
//  zunoSendReport(ZUNO_CHANNEL_DIMMER);      // report the state of the dimmer
    zunoSendReport(ZUNO_CHANNEL_TEMP);        // report the temperature from the DHT11
    zunoSendReport(ZUNO_CHANNEL_HUM);         // report the relative humidity from the DHT11
    zunoSendReport(ZUNO_CHANNEL_LUM);         // report the luminance
//  zunoSendReport(ZUNO_CHANNEL_MOTION);      // report the motion
//  zunoSendReport(ZUNO_CHANNEL_SWITCH);      // report the state of the switch
    zunoSendReport(ZUNO_CHANNEL_TEMP_BMP180); // report the temperature from the BMP180
    zunoSendReport(ZUNO_CHANNEL_PRESSURE);    // report the pressure from the BMP180
    zunoSendReport(ZUNO_CHANNEL_TEMPDS18B20); // report the temperature from the DS8B20

    printOLED();

    WaitMillis_tReport += T_REPORT;  // set next timer value
  }
  delay(200);  // wait at least 200 ms
}

void printOLED() {

//  oled.clrscr();
  oled.gotoXY(0,0);
  oled.print("Millis:");
  oled.print(millis());
    
  oled.gotoXY(0,1);
  oled.print("Temperature ");
  oled.print(lastTempBMP180/10.0);
  oled.println(" *C");
    
  oled.print("Pressure ");
  oled.print(lastPressureBMP180/100.0);
  oled.println(" kpa");
  
}

void readDS18B20() {
//  ds1820.scanAloneSensor(addrDS18B20);
  float temp = ds1820.getTemperature(addrDS18B20);
  lastTempDS18B20 = int(100.0 * temp);

  #ifdef DEBUG
    #ifdef DEBUG_DS18B20
      Serial.print("Your sensor address is: ");
      for(int i = 0; i < 8; i++) {
              // print OneWire code
              Serial.print(addrDS18B20[i], HEX);
              Serial.print(" ");
      }
      Serial.println();
        
      Serial.print("Temperature: ");
      Serial.println(temp);
    #endif
  #endif
}

void readBMP180() {
  lastTempBMP180      = bmp.readTemperature()*10;   // precision is 1 digit, so value is at a factor of 10
  lastPressureBMP180  = bmp.readPressure()/10;      // precision is 2 digits, so value is at a factor of 100 (in kpa)

  #ifdef DEBUG
    #ifdef DEBUG_BMP180
      Serial.println("readBMP180");
  //    bmp.dumpInternal();
  //    Serial.println(bmp.readRawTemperature());
      
      Serial.print("BMP 180: Temperatur: ");
      Serial.print(lastTempBMP180/10.0);
      Serial.print(" C, Druck: ");
      Serial.print(lastPressureBMP180/100.0);
      Serial.println(" kpa");
    #endif
  #endif

}

void read_DHT() {
  byte result;

  result = dht11_sensor.read(true);
  if (result == 0) {
    // only update temperature if reading is ok
    temperature = dht11_sensor.readTemperature();
    humidity    = dht11_sensor.readHumidity();
  }
}

void readLuminance() {
  lastLuminanceValue = (byte) ((0x3FF - analogRead(A3)) / 10.23); // scale 0..1023 to 0..100 (%), sensor is inverted 0=light, 1023=dark
}

void checkMotion() {
  byte currentSensorValue = digitalRead(MOTION_PIN);

  if (currentSensorValue != lastMotionValue) {
    lastMotionValue = currentSensorValue;
    zunoSendReport(5);                    // send report directly, motion is not reported in reporting loop
    if (currentSensorValue == HIGH) {
      digitalWrite(MOTION_LED_PIN, HIGH);
    } else {
      digitalWrite(MOTION_LED_PIN, LOW);
    }
  }
}

// getter / setter function calls

// CH1 - Dimmer
byte getterDim(void) {
  return lastSetDimmer;
}

void setterDim(byte value) {
  byte tempVariable;
  if (value > 99) {
    // by Z-Wave specification, this value can't be more then 99
    value = 99;
  }

  // set the LED brightness scaled to 0..99
  analogWrite(PWM1, ((long)value) * 255 / 99);

  lastSetDimmer = value;
//    // report the state in channel 1
//    zunoSendReport(1);
}

// CH2 - Temperature
word getterTemp() {
  word t;
  t = (word)(10.0 * temperature);
  return t;
}

// CH3 - Humidity
word getterHum() {
  word h;
  h = (word)(10.0 * humidity);
  return h;
}

// CH4 - Luminance
byte getterLum(void) {
  return lastLuminanceValue;
}

// CH5 - Motion
byte getterMotion() {
  if (lastMotionValue == 1) {    // if motion is detected
    return 0xff;                 // return "Triggered" state to the controller
  } else {                       // if motion stopped
    return 0;                    // return "Idle" state to the controller
  }
}

// CH6 - Switch
byte getterSwitch () {
  return currentLEDValue;
}

void setterSwitch (byte value) {
  if (value > 0) {                
    digitalWrite (SWITCH_LED_PIN, HIGH); //turn LED on
  } else {                        
    digitalWrite(SWITCH_LED_PIN, LOW);   //turn LED off
  }
  currentLEDValue = value;
}

// CH7 - TempBMP180
word getterTempBMP180() {
  return lastTempBMP180;
}

// CH8 - Pressure
//getterPressure
long getterPressure() {
  return lastPressureBMP180;
}

// CH9 - TempDS18B20
word getterTempDS18B20() {
  word t;
  t = (word)(lastTempDS18B20);
  return t;
}

Hope this helps,
Andreas.
fhem.de - ZWave development support
ftrueck
Posts: 41
Joined: 24 Dec 2015 23:46

Re: bmp180 reading of values

Post by ftrueck »

It seems that I cannot get data from the BMP Sensor.
I'm currently using an BMP280 sensor. Maybe this one is different to the BMP180 but I thought the command sets should be the same.
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: bmp180 reading of values

Post by A.Harrenberg »

Ok,
I just had a quick glance at the specification of the two sensors and it seems that they use different layouts for the registers and are therefore not compatible.
So you have to modify the library or port/adapt some BMP280 library from Arduino...

Regards,
Andreas.
fhem.de - ZWave development support
ftrueck
Posts: 41
Joined: 24 Dec 2015 23:46

Re: bmp180 reading of values

Post by ftrueck »

Well, that seems to be the issue. :-D
OK, so I start porting or modifying a library.
Well, I thought the two sensors would be compatible. My fault.

Can I contribute the new library to z-uno, so that my work was not only for me?
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: bmp180 reading of values

Post by PoltoS »

Sure! We will appreciate that. You can improve BMP180 or make zecond for 280. In both cases we will review it and add to the next release. Make sure to fill autor name (you) and licensing terms (some open source license)
A.Harrenberg
Posts: 201
Joined: 05 Sep 2016 22:27

Re: bmp180 reading of values

Post by A.Harrenberg »

Hi,

I have run my BMP180 for some days now and I am a little suprised by the received values...
BMP180_data.jpg
BMP180_data.jpg (41 KiB) Viewed 9329 times
The device should be able to give the pressure in 0.01 hpa steps, even without oversampling, but I only receive very discrete steps e.g. 992.5 hpa and 996.6 hp. There is only some intermediate values when the temperature is increasing when the circuit is getting direct sunlight during the day, but I also think that the amount of temperature correction is too high...

I only had a quick look at the formulas in the library and did not find an obvious fault there, comparing what is described in the BMP180 specification and what is done in the library.

Question is if someone has worked with an BMP180 before and can give me a hint wheter or not this behavior is normal. I have found other project with atmel/arduino where the results suggest a much higher resolution than I get.

The provided library seems to be based on the adafruit code and I normally would not expect something wrong here but the results are somewhat doggy...

I will try to analyse the library code in more detail to see if there is a problem with the resolution of the variable that might affect the values, but any hint is appreciated.

Regards,
Andreas.
fhem.de - ZWave development support
ftrueck
Posts: 41
Joined: 24 Dec 2015 23:46

Re: bmp180 reading of values

Post by ftrueck »

What type is the return value of your getter? What is the channel definition looking like? Do you use BMP180 with oversampling?
Post Reply