diff --git a/main/esp32-sensornode_main.cpp b/main/esp32-sensornode_main.cpp index 78dfb4a..e297a56 100644 --- a/main/esp32-sensornode_main.cpp +++ b/main/esp32-sensornode_main.cpp @@ -34,8 +34,8 @@ #define DB_PASSWD "c2Vuc29yczpTZW5zb3JzLXcuaW5mbHV4QGhvbWU" // BasicAuth String #if BOARD == BOARD_ESP32 -#define BATT_FULL 2812 // TODO: get actual value -#define BATT_CUTOFF 2280 // TODO: get actual value +#define BATT_FULL 3600 // 3.6V VCC (4.3V Battery) TODO: get actual value +#define BATT_CUTOFF 2300 // 2.3V VCC (3.0V Battery) TODO: get actual value #else #error "unsupported board chosen" #endif @@ -183,9 +183,8 @@ extern "C" void app_main() { } // setup the adc for VCC measurement - // TODO! adc1_config_width(ADC_WIDTH_12Bit); - adc1_config_channel_atten(ADC1_CHANNEL_0, ADC_ATTEN_11db); // 11dB ~ max 3.14V = 4069 + adc1_config_channel_atten(ADC1_CHANNEL_0, ADC_ATTEN_0db); // or ADC_ATTEN_2_5db /* GET VALUE SAMPLES */ // measure environmental data from si7021