2025-03-2505
This commit is contained in:
22
include/mess_Ub.h
Normal file
22
include/mess_Ub.h
Normal file
@ -0,0 +1,22 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
ADC_MODE(ADC_VDD);
|
||||
|
||||
const float MinimalSpannung = 2.60;
|
||||
float korectur = 0.000913242;
|
||||
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);
|
||||
dtostrf(VCC,8,2,floatString);
|
||||
Serial.printf("Vcc: \t%s V\n", floatString);
|
||||
return VCC;
|
||||
}
|
Reference in New Issue
Block a user