Raw ADC value of lipo added
This commit is contained in:
parent
61171fb379
commit
3a1b8d6745
@ -37,6 +37,8 @@
|
||||
* }
|
||||
* \enddot
|
||||
*
|
||||
* Before entering Deep sleep the controller is configured with an wakeup time.
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
#ifndef CONTROLLER_CONFIG_H
|
||||
@ -52,7 +54,7 @@
|
||||
#define MOIST_SENSOR_MIN_ADC (25 * 4095 / 100)
|
||||
|
||||
#define SOLAR_VOLT(adc) ADC_TO_VOLT_WITH_MULTI(adc, 4.0306) /**< 100k and 33k voltage dividor */
|
||||
#define ADC_5V_TO_3V3(adc) ADC_TO_VOLT_WITH_MULTI(adc, 1.7) /**< 33k and 47k8 voltage dividor */
|
||||
#define ADC_5V_TO_3V3(adc) ADC_TO_VOLT_WITH_MULTI(adc, 1.69) /**< 33k and 47k8 voltage dividor */
|
||||
#define MS_TO_S 1000
|
||||
|
||||
#define SENSOR_LIPO 34 /**< GPIO 34 (ADC1) */
|
||||
|
@ -115,8 +115,11 @@ long getLastMoisture(int plantId)
|
||||
|
||||
void readSystemSensors()
|
||||
{
|
||||
lipoRawSensor.add(analogRead(SENSOR_LIPO));
|
||||
solarRawSensor.add(analogRead(SENSOR_SOLAR));
|
||||
for (int i=0; i < 5; i++) {
|
||||
lipoRawSensor.add(analogRead(SENSOR_LIPO));
|
||||
solarRawSensor.add(analogRead(SENSOR_SOLAR));
|
||||
}
|
||||
Serial << "Lipo " << lipoRawSensor.getAverage() << " -> " << getBatteryVoltage() << endl;
|
||||
}
|
||||
|
||||
int determineNextPump();
|
||||
|
Loading…
Reference in New Issue
Block a user