Ejemplo n.º 1
0
void readBMP180(){
    tbmp180=bmp.readTemperature();
    pressure=bmp.readPressure()/100;
    
    Serial.print("Temperature = ");
    Serial.print(tbmp180);
    Serial.println(" *C");
    
    Serial.print("Pressure = ");
    Serial.print(pressure);
    Serial.println(" Pa");

    // pressure of 1013.25 millibar = 101325 Pascal
}
Ejemplo n.º 2
0
void GY80Task::printPressure()
{
	Serial1.print("Temperature = ");
	Serial1.print(bmp.readTemperature());
	Serial1.println(" *C");

	Serial1.print("Pressure = ");
	Serial1.print(bmp.readPressure());
	Serial1.println(" Pa");

	// Calculate altitude assuming 'standard' barometric
	// pressure of 1013.25 millibar = 101325 Pascal
	Serial1.print("Altitude = ");
	Serial1.print(bmp.readAltitude());
	Serial1.println(" meters");

	Serial1.print("Pressure at sealevel (calculated) = ");
	Serial1.print(bmp.readSealevelPressure());
	Serial1.println(" Pa");
}
float sensors_temperature() {
	return bmp.readTemperature();
}