Skip to content

Commit

Permalink
Update battery examples
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Mar 28, 2024
1 parent cbbc08b commit f077ebd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/ReadBattery/ReadBattery.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
* @copyright Copyright (c) 2023 Shenzhen Xin Yuan Electronic Technology Co., Ltd
* @date 2023-08-07
* @note Reading the battery voltage information is only applicable to the V1.2 version.
* The V1.1 version does not have a battery voltage divider.
* If V1.1 needs to be read, then you need to add a 100K 1% voltage divider resistor between the battery and GND
* When connected to the USB, the battery voltage data read is not the real battery voltage, so the battery
* voltage is sent to the UDP Server through UDP. When using it, please disconnect the USBC
* T-A7670x : The V1.1 version does not have a battery voltage divider.
* If V1.1 needs to be read, then you need to add a 100K 1% voltage divider resistor between the battery and GND
* When connected to the USB, the battery voltage data read is not the real battery voltage, so the battery
* voltage is sent to the UDP Server through UDP. When using it, please disconnect the USB-C
* T-A7670x : Only version V1.3 has the resistor divider connected to the solar input, other versions IO38 is not connected
* @note Onlu support T-A7670 ,T-A7608X, T-SIM7672G board , not support T-Call A7670
*/
#include <esp_adc_cal.h>
Expand Down
4 changes: 4 additions & 0 deletions examples/ReadBattery/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
#define TINY_GSM_MODEM_A7670
#endif

// It is only available in V1.3 version. In other versions, IO38 is not connected.
#define BOARD_SOLAR_ADC_PIN (38)


#elif defined(LILYGO_T_CALL_A7670_V1_0)
#define MODEM_BAUDRATE (115200)
#define MODEM_DTR_PIN (14)
Expand Down

0 comments on commit f077ebd

Please sign in to comment.