Skip to content

Commit

Permalink
Added pin config for TTGO LoRa32 V2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs authored Apr 17, 2023
1 parent 21996df commit 031aa2f
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,24 @@
#define UPDATE_MODBUS 2 // Modbus device is read every <n> seconds
#define MODBUS_RETRIES 5 // no. of modbus retries
#define INTERFACE_SEL 13 // Modbus interface select (0: USB / 1: RS485)
#define MAX485_DE 10 // D1, DE pin on the TTL to RS485 converter
#define MAX485_RE_NEG 2 // D2, RE pin on the TTL to RS485 converter
#define MAX485_RX 27 // D5, RO pin on the TTL to RS485 converter
#define MAX485_TX 9 // D6, DI pin on the TTL to RS485 converter
#define DEBUG_TX 5
#define DEBUG_RX 26
#if defined(ARDUINO_TTGO_LoRa32_v21new)
// https://github.com/espressif/arduino-esp32/blob/master/variants/ttgo-lora32-v21new/pins_arduino.h
#define MAX485_DE 14 // DE pin on the TTL to RS485 converter
#define MAX485_RE_NEG 2 // RE pin on the TTL to RS485 converter
#define MAX485_RX 15 // RO pin on the TTL to RS485 converter
#define MAX485_TX 12 // DI pin on the TTL to RS485 converter
#define DEBUG_TX 00
#define DEBUG_RX 04

#else
// LoRaWAN_Node board
// https://github.com/matthias-bs/LoRaWAN_Node
#define MAX485_DE 10 // D1, DE pin on the TTL to RS485 converter
#define MAX485_RE_NEG 2 // D2, RE pin on the TTL to RS485 converter
#define MAX485_RX 27 // D5, RO pin on the TTL to RS485 converter
#define MAX485_TX 9 // D6, DI pin on the TTL to RS485 converter
#define DEBUG_TX 5
#define DEBUG_RX 26

#endif
#define STATUS_LED LED_BUILTIN // Status LED

0 comments on commit 031aa2f

Please sign in to comment.