Help nedded with bmp280 and sh1106

HI can anyon help me with the error

Sensor Used: Bmp280
Board Arduino Nano
Oled

#include <Wire.h>
#include "i2c_BMP280.h"
#include "i2c.h"
#include "U8glib.h"


U8GLIB_SH1106_128X64 u8g(10, 9, 12, 11, 13); // SW SPI Com: SCK = 10, MOSI = 9, CS = 12, D/C = 11, RESET = 13

BMP280 bmp;


float pressure = 0.0;
float tempC = 0.0;
float altitude = 0.0;
void BmpSensorRead(float* pressure, float* tempC, float* altitude);
void DisplayPresTemp(float* pressure, float* tempC, float* altitude);

void setup(void)
{
  Serial.begin(9600);

  // assign default color value
  if (u8g.getMode() == U8G_MODE_R3G3B2)
  {
    u8g.setColorIndex(255);     // white
  }
  else if (u8g.getMode() == U8G_MODE_GRAY2BIT)
  {
    u8g.setColorIndex(3);         // max intensity
  }
  else if (u8g.getMode() == U8G_MODE_BW)
  {
    u8g.setColorIndex(1);         // pixel on
  }
  else if (u8g.getMode() == U8G_MODE_HICOLOR)
  {
    u8g.setHiColorByRGB(255, 255, 255);
  }

  for (int a = 0; a < 30; a++)
  {
    u8g.firstPage();

    do
    {
      u8g.setFont(u8g_font_fub11);
      u8g.setFontRefHeightExtendedText();
      u8g.setDefaultForegroundColor();
      u8g.setFontPosTop();
      u8g.drawStr(4, a, "BMP180 Sensor");
    }
    while (u8g.nextPage());
  }

  delay(3000);

if (bmp.initialize())
  {
    u8g.firstPage();

    do
    {
      u8g.setFont(u8g_font_fub11);
      u8g.setFontRefHeightExtendedText();
      u8g.setDefaultForegroundColor();
      u8g.setFontPosTop();
      u8g.drawStr(4, 0, "BMP085 Sensor");
      u8g.drawStr(4, 20, " ERROR!");
    }
    while (u8g.nextPage());

    Serial.println("BMP085 sensor, ERROR!");

    while (1) {}
  }
}
void loop(void)
{
  BmpSensorRead(&pressure, &tempC, &altitude);
  DisplayPresTemp(&pressure, &tempC, &altitude);
  delay(1000);
}
void DisplayPresTemp(float* pressure, float* tempC, float* altitude)
{
  u8g.firstPage();

  do
  {
    u8g.setFont(u8g_font_fub11);
    u8g.setFontRefHeightExtendedText();
    u8g.setDefaultForegroundColor();
    u8g.setFontPosTop();
    u8g.drawStr(2, 0, "Pressure");
    u8g.setPrintPos(75, 0);
    u8g.print(*pressure);
    u8g.drawStr(4, 20, "Temp C");
    u8g.setPrintPos(75, 20);
    u8g.print(*tempC);
    u8g.drawStr(4, 40, "Altitude");
    u8g.setPrintPos(75, 40);
    u8g.print(*altitude);
  }
  while (u8g.nextPage());
}
void BmpSensorRead(float* pressure, float* tempC, float* altitude)
{
  *tempC = bmp.getTemperature();
  Serial.print("Temperature = ");
  Serial.print(*tempC);
  Serial.println(" *C");

  *pressure = bmp.readPressure() / 100.0;
  Serial.print("Pressure = ");
  Serial.print(*pressure / 100.0);
  Serial.println(" hPa");

  // Calculate altitude assuming 'standard' barometric
  // pressure of 1013.25 millibar = 101325 Pascal
  *altitude = bmp.readAltitude();
  Serial.print("Altitude = ");
  Serial.print(*altitude);
  Serial.println(" meters");
}

i get the following error

[color=red]no matching function for call to 'BMP280::getTemperature()'
[/color]

If I am looking at the right library (you should always link to any library that is not included in the IDE) there are 2 functions to read the temperature. Both require parameters. You are calling the function with no parameters and there is no overload (version) of that function that takes no parameters.

void getTemperature(int32_t& millicelsius)
void getTemperature(float& celsius)

HI i am using this Library

i still cant get it to work. the thing is i am trying to use it with g8lib to get temp displayed on oled

i still cant get it to work

That conveys no information that is useful to help fix your problem. Have you written a small sketch to get the BMP to work by itself. If not, I suggest that you do.

Thanks for reply

here is the sketch for bmp280

#include <Wire.h>
#include "i2c.h"

#include "i2c_BMP280.h"
BMP280 bmp280;

void setup()
{
    Serial.begin(9600);

    Serial.print("Probe BMP280: ");
    if (bmp280.initialize()) Serial.println("Sensor found");
    else
    {
        Serial.println("Sensor missing");
        while (1) {}
    }

    // onetime-measure:
    bmp280.setEnabled(0);
    bmp280.triggerMeasurement();
}

void loop()
{
    bmp280.awaitMeasurement();

    float temperature;
    bmp280.getTemperature(temperature);


    bmp280.triggerMeasurement();


    Serial.print(temperature);
    Serial.println(" C");
}

And it provides the results that you expect or not?

yes it does

Probe BMP280: Sensor found
23.63 C
23.68 C

now i want to disply it on my oled using u8glib

any help please

Have you written a small sketch, without any other code, that can display a canned message on the OLED display or have you gotten any of the examples that come with the U8glib library to work?

HeyMate thanks bud managed to get it to work

#include <Wire.h>
#include "i2c_BMP280.h"
#include "i2c.h"
#include "U8glib.h"


U8GLIB_SH1106_128X64 u8g(10, 9, 12, 11, 13); // SW SPI Com: SCK = 10, MOSI = 9, CS = 12, D/C = 11, RESET = 13

BMP280 bmp280;



float tempC;

void BmpSensorRead(float* tempC);
void DisplayTemp(float* tempC);

void setup(void)
{
  Serial.begin(9600);

  // assign default color value
  if (u8g.getMode() == U8G_MODE_R3G3B2)
  {
    u8g.setColorIndex(255);     // white
  }
  else if (u8g.getMode() == U8G_MODE_GRAY2BIT)
  {
    u8g.setColorIndex(3);         // max intensity
  }
  else if (u8g.getMode() == U8G_MODE_BW)
  {
    u8g.setColorIndex(1);         // pixel on
  }
  else if (u8g.getMode() == U8G_MODE_HICOLOR)
  {
    u8g.setHiColorByRGB(255, 255, 255);
  }

  for (int a = 0; a < 30; a++)
  
    Serial.print("Probe BMP280: ");
    if (bmp280.initialize()) Serial.println("Sensor found");
    else
    {
        Serial.println("Sensor missing");
        while (1) {}
    }

    // onetime-measure:
    bmp280.setEnabled(0);
    bmp280.triggerMeasurement();
  bmp280.setEnabled(0);
  bmp280.triggerMeasurement();
}
void loop(void)
{

  BmpSensorRead(&tempC);
  DisplayTemp(&tempC);
  delay(10000);
}
void DisplayTemp(float* tempC)
{
  u8g.firstPage();

  do
  {
    u8g.setFont(u8g_font_courB24);
    u8g.setFontRefHeightExtendedText();
    u8g.setDefaultForegroundColor();
    u8g.setFontPosTop();
    u8g.drawStr(4, 20, "T");
    u8g.setPrintPos(75, 20);
    u8g.print(*tempC);
   
  }
  while (u8g.nextPage());
}
void BmpSensorRead(float* tempC)
{
    bmp280.awaitMeasurement();

   float temperature;
  bmp280.getTemperature(temperature);
  bmp280.triggerMeasurement();

*tempC = temperature;
  
  Serial.print("Temperature = ");
  Serial.print(*tempC);
  Serial.println("  C");


}