add missing files

This commit is contained in:
Marcus 2024-11-18 13:18:10 +01:00
parent 1624289496
commit 13d86ba88f
2 changed files with 111 additions and 0 deletions

View file

@ -0,0 +1,47 @@
/*
*
* include/Sensor/00_ADC_builtin.h - sensor header for BME280 I2C sensor
*
*
* MIT License
*
* Copyright (c) 2024 DeltaLima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#include <Adafruit_BME280.h>
#define SENSOR_02_NAME "BME280"
#define BME280_MAX 2
const byte SENSOR_02_READINGS[] = {
SENSOR_READING_TEMP,
SENSOR_READING_HUMIDITY,
SENSOR_READING_PRESSURE };
Adafruit_BME280 BME280[BME280_MAX];
void Sensor_Bme280_Init(byte sensorId) {
}

View file

@ -0,0 +1,64 @@
/*
*
* include/Sensor/Common.h - common sensor header file
*
*
* MIT License
*
* Copyright (c) 2024 DeltaLima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
/*
* Common used consts and variables, used within the Sensor header for example
*/
// for bme280 and bme680
#define SEALEVELPRESSURE_HPA (1013.25)
// How much values can a sensor return
const byte SENSOR_MAX_READING = 8;
const byte SENSOR_READING_RAW = 1;
const byte SENSOR_READING_TEMP = 2;
const byte SENSOR_READING_HUMIDITY = 3;
const byte SENSOR_READING_MOISTURE = 4;
const byte SENSOR_READING_PRESSURE = 5;
const byte SENSOR_READING_GAS_RESISTANCE = 6;
const char SENSOR_READING_RAW_descr[] = "Raw Analog";
const char SENSOR_READING_TEMP_descr[] = "Temperature °C";
const char SENSOR_READING_HUMIDITY_descr[] = "Humidity %";
const char SENSOR_READING_MOISTURE_descr[] = "Moisture %";
const char SENSOR_READING_PRESSURE_descr[] = "Pressure Pa";
const char SENSOR_READING_GAS_RESISTANCE_descr[] = "Gas resistance KOhm";
const char * Sensor_Reading_descr[] = {
NULL, // 0 is unset
SENSOR_READING_RAW_descr,
SENSOR_READING_TEMP_descr,
SENSOR_READING_HUMIDITY_descr,
SENSOR_READING_MOISTURE_descr,
SENSOR_READING_PRESSURE_descr,
SENSOR_READING_GAS_RESISTANCE_descr,
};