Wetterstation_Boris/include/mess_Ub.h

22 lines
454 B
C
Raw Normal View History

2023-05-18 12:10:48 +02:00
#include <Arduino.h>
2023-05-22 14:29:45 +02:00
ADC_MODE(ADC_VDD);
2023-05-18 12:10:48 +02:00
const float MinimalSpannung = 2.85;
2023-05-24 16:06:53 +02:00
float korectur = 0.000913242;
2023-05-18 12:10:48 +02:00
char floatString[15] = {0};
float AKKU;
float getBattery()
{
#if (NOBATT == 1)
Serial.print("Batterie:\t\t 3.05 V\n");
return 3.05;
#endif
int Vcc = ESP.getVcc();
float VCC = Vcc * korectur ;
Serial.printf("Rohdaten: %d, ", Vcc);
2023-05-19 14:15:31 +02:00
dtostrf(VCC,8,2,floatString);
Serial.printf("Vcc: \t%s V\n", floatString);
2023-05-18 12:10:48 +02:00
return VCC;
}