Started by winfried, July 11, 2023, 10:30:23 PM
#define LEMIOT_ADC_POWER_PIN GPIO_NUM_4// Set Calibration 220k:470k => (220.0 + 470.0)/470.0#define LEMIOT_ADC_POWER_CALC(x) (uint32_t)((690.0 / 470.0) * (float)(x)static int32_t voltage_power = 0;...analogSetAttenuation(ADC_11db);...static uint32_t voltage_raw_power = analogReadMilliVolts(LEMIOT_ADC_POWER_PIN);voltage_power = LEMIOT_ADC_POWER_CALC(voltage_raw_power);...
QuoteAs I understand, you don't measure the power you look if it is digital high, but I need the voltage(, since maybe powered by solar-usb etc. and control it.)
Quote from: LubOlimex on July 12, 2023, 03:08:27 PMWe measure the battery voltage. Which voltage do you want to measure?