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
Vcc | 3.3 V |
Gnd | Gnd |
SCL | Trinket A5 (Analog 5 => SCL, 3.3 kOhms hardware pull-up added) |
SDA | Trinket 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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.