diff --git a/bin/build-all.sh b/bin/build-all.sh index b7eccd59e..f8eadba91 100755 --- a/bin/build-all.sh +++ b/bin/build-all.sh @@ -33,6 +33,7 @@ for COUNTRY in $COUNTRIES; do export PLATFORMIO_BUILD_FLAGS="$COMMONOPTS" + do_build "ttgo-lora32-v2" do_build "ttgo-lora32-v1" do_build "tbeam" do_build "heltec" diff --git a/platformio.ini b/platformio.ini index f8de66947..0d6e5f9c4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -80,7 +80,11 @@ board = heltec_wifi_lora_32_V2 [env:ttgo-lora32-v1] board = ttgo-lora32-v1 +build_flags = + ${env.build_flags} -D TTGO_LORA_V1 ; note: the platformio definition for lora32-v2 seems stale, it is missing a pins_arduino.h file, therefore I don't think it works -; [env:ttgo-lora32-v2] -; board = ttgo-lora32-v2 \ No newline at end of file +[env:ttgo-lora32-v2] +board = ttgo-lora32-v1 +build_flags = + ${env.build_flags} -D TTGO_LORA_V2 \ No newline at end of file diff --git a/src/configuration.h b/src/configuration.h index a0bbdbe97..12d7a3810 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -138,12 +138,12 @@ along with this program. If not, see . #define DIO0_GPIO 26 #define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number #define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number -#elif defined(ARDUINO_TTGO_LoRa32_V1) +#elif defined(TTGO_LORA_V1) // This string must exactly match the case used in release file names or the android updater won't work #define HW_VENDOR "ttgo-lora32-v1" -#define I2C_SDA 4 // I2C pins for this board -#define I2C_SCL 15 +#define I2C_SDA 21 // I2C pins for this board +#define I2C_SCL 22 #define RESET_OLED 16 // If defined, this pin will be used to reset the display controller @@ -151,24 +151,26 @@ along with this program. If not, see . #define LED_PIN 2 // If defined we will blink this LED #define BUTTON_PIN 0 // If defined, this will be used for user button presses -#define RESET_GPIO 23 // If defined, this pin will be used to reset the LORA radio +#define RESET_GPIO 14 // If defined, this pin will be used to reset the LORA radio #define DIO0_GPIO 26 // IRQ line for the LORA radio #define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number #define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number -#elif defined(ARDUINO_TTGO_LoRa32_V2) +#elif defined(TTGO_LORA_V2) // This string must exactly match the case used in release file names or the android updater won't work #define HW_VENDOR "ttgo-lora32-v2" -#define I2C_SDA 21 // I2C pins for this board -#define I2C_SCL 22 +#define I2C_SDA 4 // I2C pins for this board +#define I2C_SCL 15 #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 2 // If defined we will blink this LED -#define BUTTON_PIN 0 // If defined, this will be used for user button presses +#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, if your board doesn't have a physical switch, you can wire one +// between this pin and ground -#define RESET_GPIO 23 // If defined, this pin will be used to reset the LORA radio +#define RESET_GPIO 14 // If defined, this pin will be used to reset the LORA radio #define DIO0_GPIO 26 // IRQ line for the LORA radio #define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number #define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number