Use the MCU internal A/D module to convert the voltage on BAT pin and send the result to serial port. More detail, please refer to: TSC2046
For display equipt with touch panel only
Direct: |
"RDBAT" |
Arduino: |
int readBattery(void)
|
C: |
int Digole_readBattery(void) |
none
integer value of converted voltage.
Example (Arduino):
int v=mydisp.readBattery(); //read the voltage on BAT pin
serial.writeString("RDBAT"); //start reading the BAT pin
int c = serial.read1(); //read 2 bytes and assemble to int
c <<= 8;
c += serial.read1();
Version | Description |
---|---|