#include <looptime.h>

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


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

float temp,atm,alt;
long pres;


#define LOOPTIME 100
unsigned long t1,t3,i=0;
void loop()
{
  Serial.print(i); 
  Serial.print(" , ");
  i+= LOOPTIME;
  Serial.print(looptime(100)); 
  Serial.print(" , ");
  //  bmp085_init();


  Serial.print( 5.0*analogRead(2)/1023.0,3 ); 
  Serial.print(" V , ");
  Serial.print( 5.0*analogRead(3)/1023.0,3 ); 
  Serial.print(" V , ");
  Serial.print( 5.0*analogRead(1)/1023.0,3 ); 
  Serial.print(" V , ");
  temp = bmp085Temp(); 
  pres = bmp085Pressure(); 

  alt = bmp085PascalToMeter(pres,101325);  
  Serial.print(temp);  
  Serial.print(" , C , ");
  Serial.print(pres);  
  Serial.print(" , Pa , ");
 
  Serial.print(alt);  
  Serial.println( " , m ");  

}







