Skip to content

Commit

Permalink
fix for I2C scan getting stuck (#3375)
Browse files Browse the repository at this point in the history
* refactor: add delay for T-Echo peripherals setup

* comment out `PIN_POWER_EN1`
  • Loading branch information
andrekir authored Mar 15, 2024
1 parent 52cfec2 commit 0dda20b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void setup()
#if defined(TTGO_T_ECHO) && defined(PIN_POWER_EN)
pinMode(PIN_POWER_EN, OUTPUT);
digitalWrite(PIN_POWER_EN, HIGH);
digitalWrite(PIN_POWER_EN1, INPUT);
// digitalWrite(PIN_POWER_EN1, INPUT);
#endif

#if defined(LORA_TCXO_GPIO)
Expand Down Expand Up @@ -965,4 +965,4 @@ void loop()
mainDelay.delay(delayMsec);
}
// if (didWake) LOG_DEBUG("wake!\n");
}
}
2 changes: 1 addition & 1 deletion src/sleep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
#ifdef TTGO_T_ECHO
#ifdef PIN_POWER_EN
pinMode(PIN_POWER_EN, INPUT); // power off peripherals
pinMode(PIN_POWER_EN1, INPUT_PULLDOWN);
// pinMode(PIN_POWER_EN1, INPUT_PULLDOWN);
#endif
#endif

Expand Down
2 changes: 1 addition & 1 deletion variants/t-echo/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ External serial flash WP25R1635FZUIL0

// Controls power for all peripherals (eink + GPS + LoRa + Sensor)
#define PIN_POWER_EN (0 + 12)
#define PIN_POWER_EN1 (0 + 13)
// #define PIN_POWER_EN1 (0 + 13)

#define USE_EINK

Expand Down

0 comments on commit 0dda20b

Please sign in to comment.