#include <Wire.h>
#include <bmp085.h>
//#define ZEROLEVELPRESS 101325
#define ZEROLEVELPRESS   102470 

void setup()
{
  Serial.begin(9600);
  Serial.println("Test af tryk/temp maaler bmp085 paa Arduino CANSAT shield");
  Serial.println(" du kan i koden aendre dagens luftryk aht hojde");
  bmp085_init();
}

float temp,atm,alt;
long pres;
 

#define LOOPTIME 200
unsigned long t1,t3;
void loop()
{
  temp = bmp085Temp(); 
  pres = bmp085Pressure(); 

  atm = pres / ZEROLEVELPRESS ; // "standard atmosphere"
  alt = bmp085PascalToMeter(pres,ZEROLEVELPRESS );  
  Serial.print("temp(C) ");
  Serial.print(temp);
  Serial.print(" - tryk (Pa) ");
  Serial.print(pres);
  Serial.print(" - tryk(rel 1 std atm) ");
  Serial.print(atm);
  Serial.print( " - hojde(m) ");
  Serial.println(alt);
  delay(300);
}






