Close

[ADIOS] Grove barometer

A project log for ADIOS

Acquisition and Display for Indoor and Outdoor Sensors

TJTJ 04/16/2018 at 18:270 Comments

Buy



http://www.seeedstudio.com/depot/Grove-Barometer-Sensor-p-1199.html

Wiki



http://www.seeedstudio.com/wiki/Grove_-_Barometer_Sensor

C++ library



http://www.seeedstudio.com/wiki/File:Barometer_Sensor.zip

Hardware

Vcc3.3 V
GndGnd
SCLTrinket A5 (Analog 5 => SCL, 3.3 kOhms hardware pull-up added)
SDATrinket A4 (Analog 4 => SDA, 3.3 kOhms hardware pull-up added)

Arduino code

#include "Barometer.h"
#include 

static float baroTempVal;
static float pressureVal;
static float altitudeVal;
Barometer baro;

void setup(void) {
  baro.init();
}

void loop(void)
{
   baroTempVal = baro.bmp085GetTemperature(baro.bmp085ReadUT());
   pressureVal = baro.bmp085GetPressure(baro.bmp085ReadUP());
   altitudeVal = baro.calcAltitude(pressureVal);

  delay(1000);
}

Discussions