5110 lcd and BME280

Hi I have been trying to make a weather station module with 5110 and BME280(with 4 pins vin,gnd,sda,scl) and I found this code somewhere

#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <Adafruit_BME280.h>
#include <Wire.h>

Adafruit_BME280 bme; // I2C
// SDA - A4 (D18)
// SCL - A5 (D19)

Adafruit_PCD8544 lcd = Adafruit_PCD8544(7, 6, 5, 4, 3);
// D7 - Serial clock out (CLK)
// D6 - Serial data out (DIN)
// D5 - Data/Command select (DC)
// D4 - LCD chip select (CE)
// D3 - LCD reset (RST)

void setup() {
 lcd.begin();
 lcd.setContrast(60);
 lcd.clearDisplay();
 Wire.begin();
 delay(1000);
 bme.begin();
}          
void loop(void) { 
 lcd.setTextSize(2);
 lcd.setCursor(8,1);
 lcd.print(bme.readPressure()/133.3);
 lcd.setCursor(8,17);
 lcd.print(bme.readTemperature(),1);
 lcd.setCursor(58,14);
 lcd.print((char)9);
 set_text(69,17,"C",BLACK);
 lcd.setCursor(8,34);
 lcd.print(bme.readHumidity());
 set_text(69,34,"%",BLACK);
 lcd.clearDisplay();
 delay(50000);
}
void set_text(int x,int y,String text,int color){
 lcd.setTextColor(color);
 lcd.setCursor(x,y);
 lcd.println(text);
 lcd.display();
}

but the lcd shows no data only 0 C 0 % and 0 mmHg so can you help what me please

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

Hi I have been trying to make a weather station module with 5110 and BME280(with 4 pins vin,gnd,sda,scl) and I found this code somewhere

#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <Adafruit_BME280.h>
#include <Wire.h>

Adafruit_BME280 bme; // I2C
// SDA - A4 (D18)
// SCL - A5 (D19)

Adafruit_PCD8544 lcd = Adafruit_PCD8544(7, 6, 5, 4, 3);
// D7 - Serial clock out (CLK)
// D6 - Serial data out (DIN)
// D5 - Data/Command select (DC)
// D4 - LCD chip select (CE)
// D3 - LCD reset (RST)

void setup() {
 lcd.begin();
 lcd.setContrast(60);
 lcd.clearDisplay();
 Wire.begin();
 delay(1000);
 bme.begin();
}          
void loop(void) { 
 lcd.setTextSize(2);
 lcd.setCursor(8,1);
 lcd.print(bme.readPressure()/133.3);
 lcd.setCursor(8,17);
 lcd.print(bme.readTemperature(),1);
 lcd.setCursor(58,14);
 lcd.print((char)9);
 set_text(69,17,"C",BLACK);
 lcd.setCursor(8,34);
 lcd.print(bme.readHumidity());
 set_text(69,34,"%",BLACK);
 lcd.clearDisplay();
 delay(50000);
}
void set_text(int x,int y,String text,int color){
 lcd.setTextColor(color);
 lcd.setCursor(x,y);
 lcd.println(text);
 lcd.display();
}

but the lcd shows no data only 0 C 0 % and 0 mmHg so can you help what me please

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

Have you adapted and run the "bme280test" example in the Adafruit_BME280 library and does it report that the sensor is working?

Have you gone through the tutorial?

Read the sensor. Then write the numbers you've got.

DON'T CROSS POST!!!!!!!!!!!!!!!!!!!! http://forum.arduino.cc/index.php?topic=525032 I HAVE REPORTED THIS THREAD TO THE MODERATORS

@dezo, please do not cross-post. Threads merged.