#include <Wire.h>
#include <BMP085.h>
BMP085 dps = BMP085();
long Temperature = 0, Pressure = 0, Altitude = 0;
void setup(void)
{
Serial.begin(9600);
Wire.begin();
delay(1000);
dps.init(); //konfig sesuai kebutuhan
}
void loop(void)
{
dps.getPressure(&Pressure);
dps.getAltitude(&Altitude);
Serial.print(" Alt(Meter):");
Serial.print(Altitude/100);
Serial.print(" Pressure(Pa):");
Serial.println(Pressure);
}
Tidak ada komentar:
Posting Komentar