VBAT schematic

This commit is contained in:
João Brázio
2025-06-16 19:51:53 +01:00
parent f3e85a6fba
commit 110bd49407
2 changed files with 16 additions and 5 deletions

View File

@@ -16,7 +16,8 @@ void WaveshareBoard::begin() {
#endif #endif
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL) #if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.setPins(PIN_BOARD_SDA, PIN_BOARD_SCL); Wire.setSDA(PIN_BOARD_SDA);
Wire.setSCL(PIN_BOARD_SCL);
#endif #endif
Wire.begin(); Wire.begin();

View File

@@ -18,10 +18,20 @@
#define SX126X_DIO2_AS_RF_SWITCH true #define SX126X_DIO2_AS_RF_SWITCH true
#define SX126X_DIO3_TCXO_VOLTAGE 0 #define SX126X_DIO3_TCXO_VOLTAGE 0
// This board has no built-in way to read battery voltage /*
// #define PIN_VBAT_READ 26 * This board has no built-in way to read battery voltage.
// #define BATTERY_SAMPLES 8 * Nevertheless it's very easy to make it work, you only require two 1% resistors.
// #define ADC_MULTIPLIER (3.1 * 3.3 * 1000) // MT Uses 3.1 *
* VSYS -- /\/\/\/\-- --+
* 200k |
* +-- GPIO28
* |
* GND -- /\/\/\/\-- --+
* 100k
*/
#define PIN_VBAT_READ 28
#define BATTERY_SAMPLES 8
#define ADC_MULTIPLIER (3.0f * 3.3f * 1000)
class WaveshareBoard : public mesh::MainBoard { class WaveshareBoard : public mesh::MainBoard {
protected: protected: