示例#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
}
示例#2
0
void GY80Task::setupBMP085()
{
	if (!bmp.begin()) {
		LogUtils::instance()->logTrace(LogUtils::error, "Could not find a valid BMP085 sensor, check wiring!");
		while (1) {}
	}
}
示例#3
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");
}
示例#4
0
void iniBMP080(){
	if (!bmp.begin()) {
		Serial.println("Could not find a valid BMP085 sensor, check wiring!");
		while (1) {}
	}
}
示例#5
0
/* Pressure */
long sensorPressure(void)
{
    long value =  bmp085.readPressure();
    return value; 
}
示例#6
0
/* Initialization */
void sensor_init(void)
{
 bmp085.begin();      
}
int32_t sensors_pressure() {
	return bmp.readPressure();
}
float sensors_temperature() {
	return bmp.readTemperature();
}
void sensors_setup() {
  if (!bmp.begin()) {
//	Serial.println("Could not find a valid BMP085 sensor, check wiring!");
	while (1) {}
  }
}