#include <Wire.h>
#include <bmp085.h>

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

float temp,atm,pres,alt;


int acc_x, acc_y, acc_z;
int ntc_voltage;

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

  alt = bmp085PascalToMeter(pres,101325); //101325 as standard 

  ntc_voltage = analogRead(A0);  
  acc_x = analogRead(A2);
  acc_y = analogRead(A3);
  acc_z = analogRead(A1);

  Serial.println(alt);
  tone(9,(int)(alt*50));
}






