Hi all
I have built a Arduino UNO powered Weather Station. I am trying to introduce sensors with both 3.3 & 5 volt supplies, i have introduced a Logic Level Shifter to get round the different power problem, but i still cannot get the BMP180 to display the Air Pressure on the LCD. Everything else, the Clock, the DHT22 & the LCD are OK. I have tried several things but i still cannot get the sketch to work. I have uploaded the sketch i am using and a Jpeg of my schematic, can anyone help please, i am so close to finishing this project.
//weather station master sketch
#include <Adafruit_BMP085.h>
#include <Wire.h>
#include <RTClib.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
#include <DHT.h>
#include <DHT_U.h>
#include <Adafruit_Sensor.h>
RTC_DS1307 RTC;
Adafruit_BMP085 bmp;
#define DHTPIN 4 // Pin which is connected to the DHT sensor.
#define DHTTYPE DHT22 // DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE); // Initialize DHT sensor for normal 16mhz Arduino
#define DS1307_ADDRESS 0x68
#if defined(ARDUINO) && ARDUINO >= 100
#define printByte(args) write(args);
#else
#define printByte(args) print(args,BYTE);
#endif
byte zero = 0x00;
float hum; //Stores humidity value
float temp; //Stores temperature value
uint8_t clock[8] = {0x0,0xe,0x15,0x17,0x11,0xe,0x0};
void setup()
{
lcd.init();
lcd.begin(20,4);
lcd.backlight();
}
void loop()
{
hum = dht.readHumidity();
temp= dht.readTemperature();
// Read Date and Time From RTC
DateTime now = RTC.now();
lcd.setCursor(1,0);
lcd.print(now.hour(), DEC);
lcd.print(':');
lcd.print(now.minute(), DEC);
lcd.print(':');
lcd.print(now.second(), DEC);
lcd.print(" "); // six spaces
lcd.setCursor(11, 0);
lcd.print(now.day(), DEC);
lcd.print('/');
lcd.print(now.month(), DEC);
lcd.print('/');
lcd.print(now.year(), DEC);
lcd.print(' ');
// Read Temperature from DHT22.
lcd.setCursor(3,1);
lcd.print("Temp. : ");
lcd.print(temp);
lcd.print("");
lcd.print((char)223);
lcd.print("C");
// Read Humidity from DHT22.
lcd.setCursor(4,2);
lcd.print("Hum. : ");
lcd.print(hum);
lcd.print(" %");
//read pressure from BMP180
lcd.setCursor(2,3);
lcd.print("Press. : ");
lcd.print(bmp.readPressure()/200);
lcd.print(" hPa");
}



