Browse Source

Allow to overwrite HLW8012 build settings

fastled
Xose Pérez 7 years ago
parent
commit
7f8fc6754d
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      code/espurna/config/sensors.h

+ 13
- 1
code/espurna/config/sensors.h View File

@ -307,11 +307,23 @@
#define HLW8012_CF_PIN 14 #define HLW8012_CF_PIN 14
#endif #endif
#define HLW8012_USE_INTERRUPTS 1 // Use interrupts to trap HLW8012 signals
#ifndef HLW8012_SEL_CURRENT
#define HLW8012_SEL_CURRENT HIGH // SEL pin to HIGH to measure current #define HLW8012_SEL_CURRENT HIGH // SEL pin to HIGH to measure current
#endif
#ifndef HLW8012_CURRENT_R
#define HLW8012_CURRENT_R 0.001 // Current resistor #define HLW8012_CURRENT_R 0.001 // Current resistor
#endif
#ifndef HLW8012_VOLTAGE_R_UP
#define HLW8012_VOLTAGE_R_UP ( 5 * 470000 ) // Upstream voltage resistor #define HLW8012_VOLTAGE_R_UP ( 5 * 470000 ) // Upstream voltage resistor
#endif
#ifndef HLW8012_VOLTAGE_R_DOWN
#define HLW8012_VOLTAGE_R_DOWN ( 1000 ) // Downstream voltage resistor #define HLW8012_VOLTAGE_R_DOWN ( 1000 ) // Downstream voltage resistor
#endif
#define HLW8012_USE_INTERRUPTS 1 // Use interrupts to trap HLW8012 signals
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// MHZ19 CO2 sensor // MHZ19 CO2 sensor


Loading…
Cancel
Save