This repository has been archived on 2025-10-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
2bki21/INF/beispiele/01.4_Battery_level/01.4_Battery_level.ino
2024-12-03 09:21:41 +01:00

21 lines
689 B
C++

/**********************************************************************
Product : Freenove 4WD Car for ESP32
Description : Read battery voltage.
Auther : www.freenove.com
Modification: 2020/12/18
**********************************************************************/
#include "Freenove_4WD_Car_For_ESP32.h"
void setup() {
Serial.begin(115200); //Set the Serial Baud rate
}
void loop() {
Serial.print("Battery ADC : ");
Serial.println(Get_Battery_Voltage_ADC());//Gets the battery ADC value
Serial.print("Battery Voltage : ");
Serial.print(Get_Battery_Voltage()); //Get the battery voltage value
Serial.println("V");
delay(300);
}