bmp180 is on pins 12 14

This commit is contained in:
Mathieu Maret 2016-03-28 23:28:33 +02:00
parent 11bb75e45b
commit 45fac78797
3 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,7 @@
#pragma once
#ifdef ENABLE_BMP180
#include <SFE_BMP180.h>
#include "debug_sketch.h"
// Get Current altitude with http://fr.mygeoposition.com/
#define ALTITUDE 130
@ -15,6 +16,6 @@ bool BMP180IsConnected();
#else //ENABLE_BMP80
int BMP180GetTemperature(double &t){return 0;};
int BMP180GetTempAndPressure(double &t, double &p){return 0;};
int BMP180Setup(int , int ){return 0;};
int BMP180Setup(int , int ){SKETCH_DEBUG_PRINTLN("BMP180 is disabled at build time"); return 0;};
bool BMP180IsConnected(){return 0;};
#endif

View File

@ -14,7 +14,7 @@ char pressureFeed[FEED_MAX_SIZE] = {};
// Should have less that MAXSUBSCRIPTIONS elements
// MAXSUBSCRIPTIONS is defined is Adafruit_mqtt.h
const int gpioWatched[] = {12, 13};
const int gpioWatched[] = {2, 13};
#define GPIO_FEED_FORMAT "/feeds/%s/gpio/%d"
#define GPIO_SET_FEED_FORMAT "/feeds/%s/gpio/%d/set"

View File

@ -21,6 +21,8 @@
#include <errno.h>
#define ENABLE_BMP180
#define SKETCH_DEBUG
#include "debug_sketch.h"
#include "BMP180.h"
@ -36,7 +38,7 @@ char eeprom[EEPROM_SIZE];
#define SAMPLING_PERIODE_MS 60000
/* I2C pin used*/
#define SDA 2
#define SDA 12
#define SCL 14
#define BOOTMODE_SETUP 0