From 001d05492431d86b2e08c861a6f6612901b03151 Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Fri, 21 Jan 2022 02:07:29 +0100 Subject: [PATCH 01/16] Update platformio.ini --- platformio.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index a9a1903ab..65d4887e9 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -default_envs = tbeam +;default_envs = tbeam ;default_envs = tbeam0.7 ;default_envs = heltec-v2.0 ;default_envs = heltec-v1 @@ -17,7 +17,7 @@ default_envs = tbeam ;default_envs = tlora-v1 ;default_envs = tlora_v1_3 ;default_envs = tlora-v2 -;default_envs = tlora-v2-1-1.6 +default_envs = tlora-v2-1-1.6 ;default_envs = lora-relay-v1 # nrf board ;default_envs = t-echo ;default_envs = nrf52840dk-geeksville From c4f64b15929c9f9da3136ea7bc26b5b8213d742e Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Fri, 21 Jan 2022 02:09:25 +0100 Subject: [PATCH 02/16] Update variant.h --- variants/tlora_v2_1_16/variant.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/variants/tlora_v2_1_16/variant.h b/variants/tlora_v2_1_16/variant.h index bc1bbc027..1a888b46f 100644 --- a/variants/tlora_v2_1_16/variant.h +++ b/variants/tlora_v2_1_16/variant.h @@ -4,6 +4,8 @@ #define GPS_TX_PIN 13 #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +// ratio of voltage divider = 2.0 (R42=100k, R43=100k) +#define ADC_MULTIPLIER 2.2 // 2.0 + 10% for correction of display undervoltage. #define I2C_SDA 21 // I2C pins for this board #define I2C_SCL 22 @@ -20,4 +22,4 @@ #define LORA_DIO0 26 // a No connect on the SX1262 module #define LORA_RESET 14 #define LORA_DIO1 35 // Not really used -#define LORA_DIO2 34 // Not really used \ No newline at end of file +#define LORA_DIO2 34 // Not really used From 08641541573f22c4fd8f09c65aa58e587f6228d6 Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Fri, 21 Jan 2022 02:26:59 +0100 Subject: [PATCH 03/16] Update platformio.ini --- platformio.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 65d4887e9..a9a1903ab 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -;default_envs = tbeam +default_envs = tbeam ;default_envs = tbeam0.7 ;default_envs = heltec-v2.0 ;default_envs = heltec-v1 @@ -17,7 +17,7 @@ ;default_envs = tlora-v1 ;default_envs = tlora_v1_3 ;default_envs = tlora-v2 -default_envs = tlora-v2-1-1.6 +;default_envs = tlora-v2-1-1.6 ;default_envs = lora-relay-v1 # nrf board ;default_envs = t-echo ;default_envs = nrf52840dk-geeksville From 91ad0df11cba8b0748f06cc45ba46f9c8e650b35 Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Sun, 23 Jan 2022 17:04:55 +0100 Subject: [PATCH 04/16] Update variant.h --- variants/heltec_v2/variant.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/variants/heltec_v2/variant.h b/variants/heltec_v2/variant.h index 85fe79e32..b3bde489f 100644 --- a/variants/heltec_v2/variant.h +++ b/variants/heltec_v2/variant.h @@ -24,18 +24,20 @@ #define LORA_DIO1 35 // Not really used #define LORA_DIO2 34 // Not really used -// ratio of voltage divider = 3.20 (R1=100k, R2=220k) -#define ADC_MULTIPLIER 3.2 #ifdef HELTEC_V2_0 +// ratio of voltage divider = 3.20 (R1=100k, R2=220k) +#define ADC_MULTIPLIER 3.2 #define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #endif #ifdef HELTEC_V2_1 +// multiplier can differentiate between 3.5 to 3.75 +#define ADC_MULTIPLIER 3.6 // arbitrary value that will be ok for most devices #define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin. -#endif \ No newline at end of file +#endif From 0b2f1d5675b195ddb2464b767a20c59a28646892 Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:33:31 +0100 Subject: [PATCH 05/16] Update platformio.ini --- platformio.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index ca6c06a0d..e418d9cfe 100644 --- a/platformio.ini +++ b/platformio.ini @@ -11,8 +11,9 @@ [platformio] default_envs = tbeam ;default_envs = tbeam0.7 -;default_envs = heltec-v2.0 ;default_envs = heltec-v1 +;default_envs = heltec-v2.0 +;default_envs = heltec-v2.1 ;default_envs = tlora-v1 ;default_envs = tlora-v1 ;default_envs = tlora_v1_3 @@ -198,7 +199,7 @@ build_flags = extends = esp32_base board = heltec_wifi_lora_32_V2 build_flags = - ${esp32_base.build_flags} -D HELTEC_V2_1 -I variants/heltec_v2 + ${esp32_base.build_flags} -D HELTEC_V2_1 -I variants/heltec_v2.1 [env:tlora-v1] extends = esp32_base From 38d1a381e6b66e687a2ba16457bd7fa91e53f66a Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:35:25 +0100 Subject: [PATCH 06/16] Create heltec_v2.1 --- variants/heltec_v2.1 | 1 + 1 file changed, 1 insertion(+) create mode 100644 variants/heltec_v2.1 diff --git a/variants/heltec_v2.1 b/variants/heltec_v2.1 new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/variants/heltec_v2.1 @@ -0,0 +1 @@ + From fe9dcbb316f62b0b2fd2b45ce72b77e88cad9b8f Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:40:15 +0100 Subject: [PATCH 07/16] Delete heltec_v2.1 --- variants/heltec_v2.1 | 1 - 1 file changed, 1 deletion(-) delete mode 100644 variants/heltec_v2.1 diff --git a/variants/heltec_v2.1 b/variants/heltec_v2.1 deleted file mode 100644 index 8b1378917..000000000 --- a/variants/heltec_v2.1 +++ /dev/null @@ -1 +0,0 @@ - From 8732b7cb4d46205abf4b1ae70c3e3b9b14e6bdb3 Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:45:51 +0100 Subject: [PATCH 08/16] Add files via upload --- variant.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 variant.h diff --git a/variant.h b/variant.h new file mode 100644 index 000000000..5b40e0e09 --- /dev/null +++ b/variant.h @@ -0,0 +1,31 @@ +// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine. +// Tested on Neo6m module. +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 36 +#define GPS_TX_PIN 37 + +#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag +#define I2C_SDA 4 // I2C pins for this board +#define I2C_SCL 15 +#endif + +#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller + +#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost +#define LED_PIN 25 // If defined we will blink this LED +#define BUTTON_PIN 0 // If defined, this will be used for user button presses + +#define USE_RF95 +#define LORA_DIO0 26 // a No connect on the SX1262 module +#ifndef USE_JTAG +#define LORA_RESET 14 +#endif +#define LORA_DIO1 35 // Not really used +#define LORA_DIO2 34 // Not really used + +// ratio of voltage divider = 3.20 (schematic R12=100k, R10=220k) +// device to device variations, the actual ratio can be between 3.2 and 4 +#define ADC_MULTIPLIER 3.6 // best fit +#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin. From c7686ad57e1c72685bb23bd7eaf5a36b2d8f2a25 Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:46:35 +0100 Subject: [PATCH 09/16] Delete variant.h --- variant.h | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 variant.h diff --git a/variant.h b/variant.h deleted file mode 100644 index 5b40e0e09..000000000 --- a/variant.h +++ /dev/null @@ -1,31 +0,0 @@ -// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine. -// Tested on Neo6m module. -#undef GPS_RX_PIN -#undef GPS_TX_PIN -#define GPS_RX_PIN 36 -#define GPS_TX_PIN 37 - -#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag -#define I2C_SDA 4 // I2C pins for this board -#define I2C_SCL 15 -#endif - -#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller - -#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost -#define LED_PIN 25 // If defined we will blink this LED -#define BUTTON_PIN 0 // If defined, this will be used for user button presses - -#define USE_RF95 -#define LORA_DIO0 26 // a No connect on the SX1262 module -#ifndef USE_JTAG -#define LORA_RESET 14 -#endif -#define LORA_DIO1 35 // Not really used -#define LORA_DIO2 34 // Not really used - -// ratio of voltage divider = 3.20 (schematic R12=100k, R10=220k) -// device to device variations, the actual ratio can be between 3.2 and 4 -#define ADC_MULTIPLIER 3.6 // best fit -#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage -#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin. From cfa0ceb6045b4ec2b4caa2d06df857e7c79528ae Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:55:26 +0100 Subject: [PATCH 10/16] Create .heltec_v2.1 --- variants/.heltec_v2.1 | 1 + 1 file changed, 1 insertion(+) create mode 100644 variants/.heltec_v2.1 diff --git a/variants/.heltec_v2.1 b/variants/.heltec_v2.1 new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/variants/.heltec_v2.1 @@ -0,0 +1 @@ + From ab947f06aa81358aaa758ab887cef372ce1088eb Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:55:51 +0100 Subject: [PATCH 11/16] Delete .heltec_v2.1 --- variants/.heltec_v2.1 | 1 - 1 file changed, 1 deletion(-) delete mode 100644 variants/.heltec_v2.1 diff --git a/variants/.heltec_v2.1 b/variants/.heltec_v2.1 deleted file mode 100644 index 8b1378917..000000000 --- a/variants/.heltec_v2.1 +++ /dev/null @@ -1 +0,0 @@ - From 791186a2645b0efdd2c7344a8d3d16dbef7ff52b Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:58:32 +0100 Subject: [PATCH 12/16] Create variant.h --- variants/heltev_v2.1/variant.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 variants/heltev_v2.1/variant.h diff --git a/variants/heltev_v2.1/variant.h b/variants/heltev_v2.1/variant.h new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/variants/heltev_v2.1/variant.h @@ -0,0 +1 @@ + From ec4346aba3092b501326b0ae1398137faa77f9cd Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 18:59:09 +0100 Subject: [PATCH 13/16] Update variant.h --- variants/heltev_v2.1/variant.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/variants/heltev_v2.1/variant.h b/variants/heltev_v2.1/variant.h index 8b1378917..7dc39ebfe 100644 --- a/variants/heltev_v2.1/variant.h +++ b/variants/heltev_v2.1/variant.h @@ -1 +1,32 @@ +// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine. +// Tested on Neo6m module. +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 36 +#define GPS_TX_PIN 37 + +#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag +#define I2C_SDA 4 // I2C pins for this board +#define I2C_SCL 15 +#endif + +#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller + +#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost +#define LED_PIN 25 // If defined we will blink this LED +#define BUTTON_PIN 0 // If defined, this will be used for user button presses + +#define USE_RF95 +#define LORA_DIO0 26 // a No connect on the SX1262 module +#ifndef USE_JTAG +#define LORA_RESET 14 +#endif +#define LORA_DIO1 35 // Not really used +#define LORA_DIO2 34 // Not really used + +// ratio of voltage divider = 3.20 (schematic R12=100k, R10=220k) +// device to device variations, the actual ratio can be between 3.2 and 4 +#define ADC_MULTIPLIER 3.6 // best fit +#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin. From c6b851a2e64c15e97aa33493f0e26a66c4027852 Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 19:01:23 +0100 Subject: [PATCH 14/16] Update variant.h --- variants/heltec_v2/variant.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/variants/heltec_v2/variant.h b/variants/heltec_v2/variant.h index b3bde489f..76b7314b5 100644 --- a/variants/heltec_v2/variant.h +++ b/variants/heltec_v2/variant.h @@ -24,20 +24,7 @@ #define LORA_DIO1 35 // Not really used #define LORA_DIO2 34 // Not really used - -#ifdef HELTEC_V2_0 - -// ratio of voltage divider = 3.20 (R1=100k, R2=220k) +// ratio of voltage divider = 3.20 (R12=100k, R10=220k) #define ADC_MULTIPLIER 3.2 #define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage -#endif - -#ifdef HELTEC_V2_1 - -// multiplier can differentiate between 3.5 to 3.75 -#define ADC_MULTIPLIER 3.6 // arbitrary value that will be ok for most devices -#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage -#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin. - -#endif From 64671c8ce7a90ce0eb1954e4627d21b061b5f1bf Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 20:38:51 +0100 Subject: [PATCH 15/16] Delete variants/heltev_v2.1 directory --- variants/heltev_v2.1/variant.h | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 variants/heltev_v2.1/variant.h diff --git a/variants/heltev_v2.1/variant.h b/variants/heltev_v2.1/variant.h deleted file mode 100644 index 7dc39ebfe..000000000 --- a/variants/heltev_v2.1/variant.h +++ /dev/null @@ -1,32 +0,0 @@ -// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine. -// Tested on Neo6m module. -#undef GPS_RX_PIN -#undef GPS_TX_PIN -#define GPS_RX_PIN 36 -#define GPS_TX_PIN 37 - -#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag -#define I2C_SDA 4 // I2C pins for this board -#define I2C_SCL 15 -#endif - -#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller - -#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost -#define LED_PIN 25 // If defined we will blink this LED -#define BUTTON_PIN 0 // If defined, this will be used for user button presses - -#define USE_RF95 -#define LORA_DIO0 26 // a No connect on the SX1262 module -#ifndef USE_JTAG -#define LORA_RESET 14 -#endif -#define LORA_DIO1 35 // Not really used -#define LORA_DIO2 34 // Not really used - -// ratio of voltage divider = 3.20 (schematic R12=100k, R10=220k) -// device to device variations, the actual ratio can be between 3.2 and 4 -#define ADC_MULTIPLIER 3.6 // best fit -#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage -#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin. - From a2eef895bd0b213b83ce238324cd66cea1f9afb1 Mon Sep 17 00:00:00 2001 From: co sto <10115135+costonisp@users.noreply.github.com> Date: Mon, 24 Jan 2022 20:40:28 +0100 Subject: [PATCH 16/16] Create variant.h --- variants/heltec_v2.1/variant.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 variants/heltec_v2.1/variant.h diff --git a/variants/heltec_v2.1/variant.h b/variants/heltec_v2.1/variant.h new file mode 100644 index 000000000..5b40e0e09 --- /dev/null +++ b/variants/heltec_v2.1/variant.h @@ -0,0 +1,31 @@ +// the default ESP32 Pin of 15 is the Oled SCL, set to 36 and 37 and works fine. +// Tested on Neo6m module. +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 36 +#define GPS_TX_PIN 37 + +#ifndef USE_JTAG // gpio15 is TDO for JTAG, so no I2C on this board while doing jtag +#define I2C_SDA 4 // I2C pins for this board +#define I2C_SCL 15 +#endif + +#define RESET_OLED 16 // If defined, this pin will be used to reset the display controller + +#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost +#define LED_PIN 25 // If defined we will blink this LED +#define BUTTON_PIN 0 // If defined, this will be used for user button presses + +#define USE_RF95 +#define LORA_DIO0 26 // a No connect on the SX1262 module +#ifndef USE_JTAG +#define LORA_RESET 14 +#endif +#define LORA_DIO1 35 // Not really used +#define LORA_DIO2 34 // Not really used + +// ratio of voltage divider = 3.20 (schematic R12=100k, R10=220k) +// device to device variations, the actual ratio can be between 3.2 and 4 +#define ADC_MULTIPLIER 3.6 // best fit +#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.