BMP180 Code + Library to SD card
#include <Wire.h> #include <SD.h> #include "BMP180Lib.c" #define BMP180_ADDRESS 0x77 // I2C address of BMP180 // Read 1 byte from the BMP180 at 'address' // Add these to the top of your program const float p0 = 101325; // Pressure at sea level (Pa) float altitude; const int CS_PIN =10; char bmp180Read(unsigned char address) { unsigned char data; Wire.beginTransmission(BMP180_ADDRESS); Wire.write(address); Wire.endTransmission(); Wire.requestFrom(BMP180_ADDRESS, 1); while(!Wire.available()) ; return Wire.read(); } // Read 2 bytes from the BMP180 // First byte will be from 'address' // Second byte will be from 'address'+1 int bmp180ReadInt(unsigned char address) { unsigned char msb, lsb; Wire.beginTransmission(BMP180_ADDRESS); Wire.write(address); Wire.endTransmission(); Wire.requestFrom(BMP180_ADDRESS, 2); while(Wire.available()<2) ; msb = Wire....