Domotique/WifiControlSensor/BME680.h

27 lines
694 B
C
Raw Normal View History

2020-02-27 00:07:30 +01:00
#pragma once
#ifdef CONFIG_ENABLE_BME680
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include "Adafruit_BME680.h"
#include "debug_sketch.h"
#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10
//Use Default i2c pin GPIO4(D2): SDA, GPIO5(D1):SCL
#define SEALEVELPRESSURE_HPA (1013.25)
int BME680GetMeasure(float &t, float &p, float &h, float &g, float &a);
int BME680Setup();
bool BME680IsConnected();
2020-07-28 19:37:19 +02:00
#else //CONFIG_ENABLE_BME680
2020-02-28 17:16:39 +01:00
int BME680GetMeasure(float &, float &, float&, float &, float &){return -1;};
2020-02-27 00:07:30 +01:00
int BME680Setup(){SKETCH_DEBUG_PRINTLN("BME680 is disabled at build time"); return -1;};
bool BME680IsConnected(){return false;};
#endif