Skip to content

Commit

Permalink
testing for heltec v2_1
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed May 20, 2024
1 parent 916cbad commit 9a33df4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/battery_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace BATTERY_Utils {
#if defined(HELTEC_WSL_V3) || defined(HELTEC_WIRELESS_TRACKER)
digitalWrite(ADC_CTRL, HIGH);
#endif
#ifdef HELTEC_V3
#if defined(HELTEC_V3) || defined(HELTEC_V2)
digitalWrite(ADC_CTRL, LOW);
#endif
#endif
Expand All @@ -48,7 +48,7 @@ namespace BATTERY_Utils {
#if defined(HELTEC_WSL_V3) || defined(HELTEC_WIRELESS_TRACKER)
digitalWrite(ADC_CTRL, LOW);
#endif
#ifdef HELTEC_V3_GPS
#if defined(HELTEC_V3) || defined(HELTEC_V2)
digitalWrite(ADC_CTRL, HIGH);
#endif
double inputDivider = (1.0 / (390.0 + 100.0)) * 100.0; // The voltage divider is a 390k + 100k resistor in series, 100k on the low side.
Expand Down
7 changes: 6 additions & 1 deletion src/boards_pinout.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,15 @@
#ifdef HELTEC_HTCT62
#define BATTERY_PIN 1
#endif
#if defined(TTGO_T_LORA32_V2_1) || defined(HELTEC_V2) || defined(TTGO_T_LORA32_V2_1_915)
#if defined(TTGO_T_LORA32_V2_1) || defined(TTGO_T_LORA32_V2_1_915)
#define INTERNAL_LED_PIN 25 // Green Led
#define BATTERY_PIN 35 // es 35 el led y 1 bateria?
#endif
#if defined(HELTEC_V2)
#define INTERNAL_LED_PIN 25
#define BATTERY_PIN 37
#define ADC_CTRL 21
#endif
#if defined(HELTEC_V3) || defined(HELTEC_WSL_V3) || defined(HELTEC_WS)
#define INTERNAL_LED_PIN 35
#define BATTERY_PIN 1
Expand Down

0 comments on commit 9a33df4

Please sign in to comment.