Browse Source

Addind SDS011 to arduino.h and progmem.h

webui
Xose Pérez 6 years ago
parent
commit
07ddb70afd
3 changed files with 28 additions and 23 deletions
  1. +2
    -0
      code/espurna/config/arduino.h
  2. +3
    -0
      code/espurna/config/progmem.h
  3. +23
    -23
      code/espurna/config/sensors.h

+ 2
- 0
code/espurna/config/arduino.h View File

@ -160,6 +160,8 @@
//#define NTC_SUPPORT 1 //#define NTC_SUPPORT 1
//#define PMSX003_SUPPORT 1 //#define PMSX003_SUPPORT 1
//#define PZEM004T_SUPPORT 1 //#define PZEM004T_SUPPORT 1
//#define SDS011_SUPPORT 1
//#define SENSEAIR_SUPPORT 1
//#define SHT3X_I2C_SUPPORT 1 //#define SHT3X_I2C_SUPPORT 1
//#define SI7021_SUPPORT 1 //#define SI7021_SUPPORT 1
//#define SONAR_SUPPORT 1 //#define SONAR_SUPPORT 1


+ 3
- 0
code/espurna/config/progmem.h View File

@ -196,6 +196,9 @@ PROGMEM const char espurna_sensors[] =
#if PZEM004T_SUPPORT #if PZEM004T_SUPPORT
"PZEM004T " "PZEM004T "
#endif #endif
#if SDS011_SUPPORT
"SDS011 "
#endif
#if SENSEAIR_SUPPORT #if SENSEAIR_SUPPORT
"SENSEAIR " "SENSEAIR "
#endif #endif


+ 23
- 23
code/espurna/config/sensors.h View File

@ -430,23 +430,6 @@
#define MHZ19_TX_PIN 15 #define MHZ19_TX_PIN 15
#endif #endif
//------------------------------------------------------------------------------
// SDS011 particulates sensor
// Enable support by passing SDS011_SUPPORT=1 build flag
//------------------------------------------------------------------------------
#ifndef SDS011_SUPPORT
#define SDS011_SUPPORT 0
#endif
#ifndef SDS011_RX_PIN
#define SDS011_RX_PIN 14
#endif
#ifndef SDS011_TX_PIN
#define SDS011_TX_PIN 12
#endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// NTC sensor // NTC sensor
// Enable support by passing NTC_SUPPORT=1 build flag // Enable support by passing NTC_SUPPORT=1 build flag
@ -484,6 +467,23 @@
#define NTC_BETA 3977 // Beta coeficient #define NTC_BETA 3977 // Beta coeficient
#endif #endif
//------------------------------------------------------------------------------
// SDS011 particulates sensor
// Enable support by passing SDS011_SUPPORT=1 build flag
//------------------------------------------------------------------------------
#ifndef SDS011_SUPPORT
#define SDS011_SUPPORT 0
#endif
#ifndef SDS011_RX_PIN
#define SDS011_RX_PIN 14
#endif
#ifndef SDS011_TX_PIN
#define SDS011_TX_PIN 12
#endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// SenseAir CO2 sensor // SenseAir CO2 sensor
// Enable support by passing SENSEAIR_SUPPORT=1 build flag // Enable support by passing SENSEAIR_SUPPORT=1 build flag
@ -674,8 +674,8 @@
GUVAS12SD_SUPPORT || \ GUVAS12SD_SUPPORT || \
HLW8012_SUPPORT || \ HLW8012_SUPPORT || \
MHZ19_SUPPORT || \ MHZ19_SUPPORT || \
SDS011_SUPPORT || \
NTC_SUPPORT || \ NTC_SUPPORT || \
SDS011_SUPPORT || \
SENSEAIR_SUPPORT || \ SENSEAIR_SUPPORT || \
PMSX003_SUPPORT || \ PMSX003_SUPPORT || \
PZEM004T_SUPPORT || \ PZEM004T_SUPPORT || \
@ -803,16 +803,16 @@
#include "../sensors/MHZ19Sensor.h" #include "../sensors/MHZ19Sensor.h"
#endif #endif
#if SDS011_SUPPORT
#include <SoftwareSerial.h>
#include "../sensors/SDS011Sensor.h"
#endif
#if NTC_SUPPORT #if NTC_SUPPORT
#include "../sensors/AnalogSensor.h" #include "../sensors/AnalogSensor.h"
#include "../sensors/NTCSensor.h" #include "../sensors/NTCSensor.h"
#endif #endif
#if SDS011_SUPPORT
#include <SoftwareSerial.h>
#include "../sensors/SDS011Sensor.h"
#endif
#if SENSEAIR_SUPPORT #if SENSEAIR_SUPPORT
#include <SoftwareSerial.h> #include <SoftwareSerial.h>
#include "../sensors/SenseAirSensor.h" #include "../sensors/SenseAirSensor.h"


Loading…
Cancel
Save