project migrated to arduino LMIC 1.6 MCCI
This commit is contained in:
1 parent
7b666b2737
commit
f670bc1f63
50 files changed
+553
-6547
No files matched your search
+13
-12
@@ -1,21 +1,22 @@
|
||||
#ifndef _EBOX_H
|
||||
#define _EBOX_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for ebox ESP32-bit with external connected RFM95 LoRa
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
||||
#define CFG_sx1276_radio 1
|
||||
|
||||
#define HAS_LED GPIO_NUM_23 // blue LED on board
|
||||
#define HAS_BUTTON GPIO_NUM_0 // button "PROG" on board
|
||||
#define HAS_LED (23) // blue LED on board
|
||||
#define HAS_BUTTON (0) // button "PROG" on board
|
||||
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- SX1276 NSS (Pin19) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // ESP32 GPIO27 (Pin27) -- SX1276 MOSI (Pin18) SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // ESP32 GPIO19 (Pin19) -- SX1276 MISO (Pin17) SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // ESP32 GPIO5 (Pin5) -- SX1276 SCK (Pin16) SPI Clock Input
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (14)
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (33)
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST GPIO_NUM_14 // ESP32 GPIO14 (Pin14) -- SX1276 NRESET (Pin7) Reset Trigger Input
|
||||
#define DIO0 GPIO_NUM_26 // ESP32 GPIO26 (Pin15) -- SX1276 DIO0 (Pin8) used by LMIC for detecting LoRa RX_Done & TX_Done
|
||||
#define DIO1 GPIO_NUM_33 // ESP32 GPIO33 (Pin13) -- SX1276 DIO1 (Pin9) used by LMIC for detecting LoRa RX_Timeout
|
||||
#define DIO2 LMIC_UNUSED_PIN // 32 ESP32 GPIO32 (Pin12) -- SX1276 DIO2 (Pin10) not used by LMIC for LoRa (Timeout for FSK only)
|
||||
#endif
|
||||
+14
-13
@@ -1,22 +1,23 @@
|
||||
#ifndef _EBOXTUBE_H
|
||||
#define _EBOXTUBE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for ebox ESP32-bit with external connected RFM95 LoRa
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
||||
#define CFG_sx1276_radio 1
|
||||
|
||||
#define HAS_LED GPIO_NUM_22 // Green LED on board
|
||||
#define HAS_RGB_LED GPIO_NUM_2 // WS2812B RGB LED on board
|
||||
#define HAS_BUTTON GPIO_NUM_0 // button "FLASH" on board
|
||||
#define HAS_LED (22) // Green LED on board
|
||||
#define HAS_RGB_LED (2) // WS2812B RGB LED on board
|
||||
#define HAS_BUTTON (0) // button "FLASH" on board
|
||||
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- SX1276 NSS (Pin19) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // ESP32 GPIO27 (Pin27) -- SX1276 MOSI (Pin18) SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // ESP32 GPIO19 (Pin19) -- SX1276 MISO (Pin17) SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // ESP32 GPIO5 (Pin5) -- SX1276 SCK (Pin16) SPI Clock Input
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (14)
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (33)
|
||||
#define DIO2 (32)
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST GPIO_NUM_14 // ESP32 GPIO14 (Pin14) -- SX1276 NRESET (Pin7) Reset Trigger Input
|
||||
#define DIO0 GPIO_NUM_26 // ESP32 GPIO26 (Pin15) -- SX1276 DIO0 (Pin8) used by LMIC for detecting LoRa RX_Done & TX_Done
|
||||
#define DIO1 GPIO_NUM_33 // ESP32 GPIO33 (Pin13) -- SX1276 DIO1 (Pin9) used by LMIC for detecting LoRa RX_Timeout
|
||||
#define DIO2 GPIO_NUM_32 // ESP32 GPIO32 (Pin12) -- SX1276 DIO2 (Pin10) not used by LMIC for LoRa (Timeout for FSK only)
|
||||
#endif
|
||||
+12
-9
@@ -1,3 +1,8 @@
|
||||
#ifndef _FIPY_H
|
||||
#define _FIPY_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for Pycom FiPy Board
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
@@ -8,16 +13,14 @@
|
||||
#define HAS_RGB_LED GPIO_NUM_0 // WS2812B RGB LED on GPIO0
|
||||
#define BOARD_HAS_PSRAM // use extra 4MB extern RAM
|
||||
|
||||
// Hardware pin definitions for Pycom FiPy board
|
||||
#define PIN_SPI_SS GPIO_NUM_18
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27
|
||||
#define PIN_SPI_MISO GPIO_NUM_19
|
||||
#define PIN_SPI_SCK GPIO_NUM_5
|
||||
#define RST LMIC_UNUSED_PIN
|
||||
#define DIO0 GPIO_NUM_23 // LoRa IRQ
|
||||
#define DIO1 GPIO_NUM_23 // workaround
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST LMIC_UNUSED_PIN
|
||||
#define DIO0 (23) // LoRa IRQ
|
||||
#define DIO1 (23) // Pin tied via diode to DIO0
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
|
||||
// select WIFI antenna (internal = onboard / external = u.fl socket)
|
||||
#define HAS_ANTENNA_SWITCH GPIO_NUM_21 // pin for switching wifi antenna
|
||||
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
|
||||
|
||||
#endif
|
||||
+20
-17
@@ -1,3 +1,8 @@
|
||||
#ifndef _GENERIC_H
|
||||
#define _GENERIC_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for generic ESP32 boards
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa or has no LoRa
|
||||
@@ -13,30 +18,28 @@
|
||||
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // uses GPIO7
|
||||
#define BATT_FACTOR 2 // voltage divider 100k/100k on board
|
||||
|
||||
#define HAS_LED GPIO_NUM_21 // on board LED
|
||||
#define HAS_BUTTON GPIO_NUM_39 // on board button
|
||||
#define HAS_RGB_LED GPIO_NUM_0 // WS2812B RGB LED on GPIO0
|
||||
#define HAS_LED (21) // on board LED
|
||||
#define HAS_BUTTON (39) // on board button
|
||||
#define HAS_RGB_LED (0) // WS2812B RGB LED on GPIO0
|
||||
|
||||
#define BOARD_HAS_PSRAM // use extra 4MB extern RAM
|
||||
|
||||
#define HAS_GPS 1 // use if board has GPS
|
||||
#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M or 7M with default configuration
|
||||
|
||||
// pin definitions for SPI interface of LoRa chip
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // SPI Chip Select
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // SPI Clock
|
||||
#define RST LMIC_UNUSED_PIN // LoRa Reset (if wired)
|
||||
#define DIO0 GPIO_NUM_26 // LoRa IO0
|
||||
#define DIO1 GPIO_NUM_32 // LoRa IO1
|
||||
#define DIO2 LMIC_UNUSED_PIN // LoRa IO2 (not needed)
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define MY_OLED_SDA (4)
|
||||
#define MY_OLED_SCL (15)
|
||||
#define MY_OLED_RST (16)
|
||||
|
||||
// pin definitions for I2C interface of OLED Display
|
||||
#define OLED_RST GPIO_NUM_16 // SSD1306 RST
|
||||
#define I2C_SDA GPIO_NUM_4 // SD1306 D1+D2
|
||||
#define I2C_SCL GPIO_NUM_15 // SD1306 D0
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (14)
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (33)
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
|
||||
// I2C config for Microchip 24AA02E64 DEVEUI unique address
|
||||
#define MCP_24AA02E64_I2C_ADDRESS 0x50 // I2C address for the 24AA02E64
|
||||
#define MCP_24AA02E64_MAC_ADDRESS 0xF8 // Memory adress of unique deveui 64 bits
|
||||
#define MCP_24AA02E64_MAC_ADDRESS 0xF8 // Memory adress of unique deveui 64 bits
|
||||
|
||||
#endif
|
||||
+17
-16
@@ -1,3 +1,8 @@
|
||||
#ifndef _HELTEC_H
|
||||
#define _HELTEC_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for Heltec LoRa-32 Board
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
@@ -5,22 +10,18 @@
|
||||
#define CFG_sx1276_radio 1
|
||||
|
||||
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C // OLED-Display on board
|
||||
#define HAS_LED GPIO_NUM_25 // white LED on board
|
||||
#define HAS_BUTTON GPIO_NUM_0 // button "PROG" on board
|
||||
#define HAS_LED (25) // white LED on board
|
||||
#define HAS_BUTTON (0) // button "PROG" on board
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- SX1276 NSS (Pin19) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // ESP32 GPIO27 (Pin27) -- SX1276 MOSI (Pin18) SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // ESP32 GPIO19 (Pin19) -- SX1276 MISO (Pin17) SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // ESP32 GPIO5 (Pin5) -- SX1276 SCK (Pin16) SPI Clock Input
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define MY_OLED_SDA (4)
|
||||
#define MY_OLED_SCL (15)
|
||||
#define MY_OLED_RST (16)
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST GPIO_NUM_14 // ESP32 GPIO14 (Pin14) -- SX1276 NRESET (Pin7) Reset Trigger Input
|
||||
#define DIO0 GPIO_NUM_26 // ESP32 GPIO26 (Pin15) -- SX1276 DIO0 (Pin8) used by LMIC for detecting LoRa RX_Done & TX_Done
|
||||
#define DIO1 GPIO_NUM_33 // ESP32 GPIO33 (Pin13) -- SX1276 DIO1 (Pin9) used by LMIC for detecting LoRa RX_Timeout
|
||||
#define DIO2 LMIC_UNUSED_PIN // 32 ESP32 GPIO32 (Pin12) -- SX1276 DIO2 (Pin10) not used by LMIC for LoRa (Timeout for FSK only)
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (14)
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (33)
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
|
||||
// Hardware pin definitions for Heltec LoRa-32 Board with OLED SSD1306 I2C Display
|
||||
#define OLED_RST GPIO_NUM_16 // ESP32 GPIO16 (Pin16) -- SD1306 RST
|
||||
#define I2C_SDA GPIO_NUM_4 // ESP32 GPIO4 (Pin4) -- SD1306 D1+D2
|
||||
#define I2C_SCL GPIO_NUM_15 // ESP32 GPIO15 (Pin15) -- SD1306 D0
|
||||
#endif
|
||||
+17
-16
@@ -1,3 +1,8 @@
|
||||
#ifndef _HELTECV2_H
|
||||
#define _HELTECV2_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for Heltec V2 LoRa-32 Board
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
@@ -5,22 +10,18 @@
|
||||
#define CFG_sx1276_radio 1
|
||||
|
||||
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C // OLED-Display on board
|
||||
#define HAS_LED GPIO_NUM_25 // white LED on board
|
||||
#define HAS_BUTTON GPIO_NUM_0 // button "PROG" on board
|
||||
#define HAS_LED (25) // white LED on board
|
||||
#define HAS_BUTTON (0) // button "PROG" on board
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 -- SX1276 NSS (Pin19) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // ESP32 GPIO27 -- SX1276 MOSI (Pin18) SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // ESP32 GPIO19 -- SX1276 MISO (Pin17) SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // ESP32 GPIO5 -- SX1276 SCK (Pin16) SPI Clock Input
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define OLED_SDA (4)
|
||||
#define OLED_SCL (15)
|
||||
#define OLED_RST (16)
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST GPIO_NUM_14 // ESP32 GPIO18 -- SX1276 NRESET (Pin7) Reset Trigger Input
|
||||
#define DIO0 GPIO_NUM_26 // ESP32 GPIO26 -- SX1276 DIO0 (Pin8) used by LMIC for detecting LoRa RX_Done & TX_Done
|
||||
#define DIO1 GPIO_NUM_34 // ESP32 GPIO33 -- SX1276 DIO1 (Pin9) used by LMIC for detecting LoRa RX_Timeout
|
||||
#define DIO2 GPIO_NUM_35 // 32 ESP32 GPIO32 -- SX1276 DIO2 (Pin10) not used by LMIC for LoRa (Timeout for FSK only)
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (14)
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (34)
|
||||
#define DIO2 (35)
|
||||
|
||||
// Hardware pin definitions for Heltec LoRa-32 Board with OLED SSD1306 I2C Display
|
||||
#define OLED_RST GPIO_NUM_16 // ESP32 GPIO16 -- SD1306 RST
|
||||
#define I2C_SDA GPIO_NUM_4 // ESP32 GPIO4 -- SD1306 D1+D2
|
||||
#define I2C_SCL GPIO_NUM_15 // ESP32 GPIO15 -- SD1306 D0
|
||||
#endif
|
||||
@@ -1,3 +1,8 @@
|
||||
#ifndef _LOLINLITE_H
|
||||
#define _LOLINLITE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for lolin32lite (without LoRa shield)
|
||||
|
||||
#define CFG_sx1272_radio 1 // dummy
|
||||
@@ -5,4 +10,6 @@
|
||||
#define HAS_LED 22 // on board LED on GPIO22
|
||||
#define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW
|
||||
|
||||
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
||||
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
||||
|
||||
#endif
|
||||
+17
-16
@@ -1,3 +1,8 @@
|
||||
#ifndef _LOLINLITELORA_H
|
||||
#define _LOLINLITELORA_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for lolin32 lite with loraNode32 shield
|
||||
// See https://github.com/hallard/LoLin32-Lite-Lora
|
||||
|
||||
@@ -16,24 +21,20 @@
|
||||
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
||||
#define CFG_sx1276_radio 1 // RFM95 module
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS 5 // ESP32 GPIO5 (Pin5) -- SX1276 NSS (Pin19) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI 23 // ESP32 GPIO23 (Pin23) -- SX1276 MOSI (Pin18) SPI Data Input
|
||||
#define PIN_SPI_MISO 19 // ESP32 GPIO19 (Pin19) -- SX1276 MISO (Pin17) SPI Data Output
|
||||
#define PIN_SPI_SCK 18 // ESP32 GPIO18 (Pin18 -- SX1276 SCK (Pin16) SPI Clock Input
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (25)
|
||||
#define DIO0 (27)
|
||||
#define DIO1 (26)
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
#define DIO5 LMIC_UNUSED_PIN
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST 25 // ESP32 GPIO25 (Pin25) -- SX1276 NRESET (Pin7) Reset Trigger Input
|
||||
#define DIO0 27 // ESP32 GPIO27 (Pin27) -- SX1276 DIO0 (Pin8) used by LMIC for detecting LoRa RX_Done & TX_Done
|
||||
#define DIO1 26 // ESP32 GPIO26 (Pin26) -- SX1276 DIO1 (Pin9) used by LMIC for detecting LoRa RX_Timeout
|
||||
#define DIO2 LMIC_UNUSED_PIN // 4 ESP32 GPIO4 (Pin4) -- SX1276 DIO2 (Pin10) not used by LMIC for LoRa (Timeout for FSK only)
|
||||
#define DIO5 LMIC_UNUSED_PIN // 35 ESP32 GPIO35 (Pin35) -- SX1276 DIO5 not used by LMIC for LoRa (Timeout for FSK only)
|
||||
|
||||
// Hardware pin definitions for LoRaNode32 Board with OLED I2C Display
|
||||
#define OLED_RST U8X8_PIN_NONE // Not reset pin
|
||||
#define I2C_SDA 14 // ESP32 GPIO14 (Pin14) -- OLED SDA
|
||||
#define I2C_SCL 12 // ESP32 GPIO12 (Pin12) -- OLED SCL
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define MY_OLED_SDA (14)
|
||||
#define MY_OLED_SCL (12)
|
||||
#define MY_OLED_RST U8X8_PIN_NONE
|
||||
|
||||
// I2C config for Microchip 24AA02E64 DEVEUI unique address
|
||||
#define MCP_24AA02E64_I2C_ADDRESS 0x50 // I2C address for the 24AA02E64
|
||||
#define MCP_24AA02E64_MAC_ADDRESS 0xF8 // Memory adress of unique deveui 64 bits
|
||||
|
||||
#endif
|
||||
+17
-16
@@ -1,3 +1,8 @@
|
||||
#ifndef _LOLINLORA_H
|
||||
#define _LOLINLORA_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for lolin32 with loraNode32 shield
|
||||
// See https://github.com/hallard/LoLin32-Lora
|
||||
|
||||
@@ -17,24 +22,20 @@
|
||||
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
||||
#define CFG_sx1276_radio 1 // RFM95 module
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS 5 // ESP32 GPIO5 (Pin5) -- SX1276 NSS (Pin19) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI 23 // ESP32 GPIO23 (Pin23) -- SX1276 MOSI (Pin18) SPI Data Input
|
||||
#define PIN_SPI_MISO 19 // ESP32 GPIO19 (Pin19) -- SX1276 MISO (Pin17) SPI Data Output
|
||||
#define PIN_SPI_SCK 18 // ESP32 GPIO18 (Pin18 -- SX1276 SCK (Pin16) SPI Clock Input
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (25)
|
||||
#define DIO0 (27)
|
||||
#define DIO1 (26)
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
#define DIO5 LMIC_UNUSED_PIN
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST 25 // ESP32 GPIO25 (Pin25) -- SX1276 NRESET (Pin7) Reset Trigger Input
|
||||
#define DIO0 27 // ESP32 GPIO27 (Pin27) -- SX1276 DIO0 (Pin8) used by LMIC for detecting LoRa RX_Done & TX_Done
|
||||
#define DIO1 26 // ESP32 GPIO26 (Pin26) -- SX1276 DIO1 (Pin9) used by LMIC for detecting LoRa RX_Timeout
|
||||
#define DIO2 LMIC_UNUSED_PIN // 4 ESP32 GPIO4 (Pin4) -- SX1276 DIO2 (Pin10) not used by LMIC for LoRa (Timeout for FSK only)
|
||||
#define DIO5 LMIC_UNUSED_PIN // 35 ESP32 GPIO35 (Pin35) -- SX1276 DIO5 not used by LMIC for LoRa (Timeout for FSK only)
|
||||
|
||||
// Hardware pin definitions for LoRaNode32 Board with OLED I2C Display
|
||||
#define OLED_RST U8X8_PIN_NONE // Not reset pin
|
||||
#define I2C_SDA 21 // ESP32 GPIO21 (Pin21) -- OLED SDA
|
||||
#define I2C_SCL 22 // ESP32 GPIO22 (Pin22) -- OLED SCL
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define MY_OLED_SDA (21)
|
||||
#define MY_OLED_SCL (22)
|
||||
#define MY_OLED_RST U8X8_PIN_NONE
|
||||
|
||||
// I2C config for Microchip 24AA02E64 DEVEUI unique address
|
||||
#define MCP_24AA02E64_I2C_ADDRESS 0x50 // I2C address for the 24AA02E64
|
||||
#define MCP_24AA02E64_MAC_ADDRESS 0xF8 // Memory adress of unique deveui 64 bits
|
||||
|
||||
#endif
|
||||
+19
-8
@@ -1,23 +1,32 @@
|
||||
#ifndef _LOPY_H
|
||||
#define _LOPY_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for Pycom LoPy Board (NOT LoPy4)
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
||||
#define CFG_sx1272_radio 1
|
||||
#define HAS_LED NOT_A_PIN // LoPy4 has no on board mono LED, we use on board RGB LED
|
||||
#define HAS_RGB_LED GPIO_NUM_0 // WS2812B RGB LED on GPIO0
|
||||
#define HAS_RGB_LED (0) // WS2812B RGB LED on GPIO0
|
||||
|
||||
/* SPI remapping does currently not work!!
|
||||
// Hardware pin definitions for Pycom LoPy board
|
||||
#define PIN_SPI_SS GPIO_NUM_17
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27
|
||||
#define PIN_SPI_MISO GPIO_NUM_19
|
||||
#define PIN_SPI_SCK GPIO_NUM_5
|
||||
#define RST GPIO_NUM_18
|
||||
#define DIO0 GPIO_NUM_23 // LoRa IRQ
|
||||
#define DIO1 GPIO_NUM_23 // Pin tied via diode to DIO0
|
||||
#define DIO2 GPIO_NUM_23 // Pin tied via diode to DIO0
|
||||
*/
|
||||
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (18)
|
||||
#define DIO0 (23) // LoRa IRQ
|
||||
#define DIO1 (23) // Pin tied via diode to DIO0
|
||||
#define DIO2 (23) // Pin tied via diode to DIO0
|
||||
|
||||
// select WIFI antenna (internal = onboard / external = u.fl socket)
|
||||
#define HAS_ANTENNA_SWITCH GPIO_NUM_16 // pin for switching wifi antenna
|
||||
#define HAS_ANTENNA_SWITCH (16) // pin for switching wifi antenna
|
||||
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
|
||||
|
||||
// uncomment this only if your LoPy runs on a PYTRACK BOARD
|
||||
@@ -26,10 +35,12 @@
|
||||
//#define GPS_ADDR 0x10
|
||||
|
||||
// uncomment this only if your LoPy runs on a EXPANSION BOARD
|
||||
//#define HAS_LED GPIO_NUM_12 // use if LoPy is on Expansion Board, this has a user LED
|
||||
//#define HAS_LED (12) // use if LoPy is on Expansion Board, this has a user LED
|
||||
//#define LED_ACTIVE_LOW 1 // use if LoPy is on Expansion Board, this has a user LED
|
||||
//#define HAS_BUTTON GPIO_NUM_13 // user button on expansion board
|
||||
//#define HAS_BUTTON (13) // user button on expansion board
|
||||
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
||||
//#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
|
||||
//#define BATT_FACTOR 2 // voltage divider 1MOhm/1MOhm -> expansion board 3.0
|
||||
//#define BATT_FACTOR 4 // voltage divider 115kOhm/56kOhm -> expansion board 2.0
|
||||
|
||||
#endif
|
||||
+16
-13
@@ -1,24 +1,25 @@
|
||||
#ifndef _LOPY4_H
|
||||
#define _LOPY4_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for Pycom LoPy4 Board
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
||||
#define CFG_sx1276_radio 1
|
||||
//#define HAS_LED NOT_A_PIN // LoPy4 has no on board mono LED, we use on board RGB LED
|
||||
#define HAS_RGB_LED GPIO_NUM_0 // WS2812B RGB LED on GPIO0 (P2)
|
||||
#define HAS_RGB_LED (0) // WS2812B RGB LED on GPIO0 (P2)
|
||||
#define BOARD_HAS_PSRAM // use extra 4MB extern RAM
|
||||
|
||||
// Hardware pin definitions for Pycom LoPy4 board
|
||||
#define PIN_SPI_SS GPIO_NUM_18
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27
|
||||
#define PIN_SPI_MISO GPIO_NUM_19
|
||||
#define PIN_SPI_SCK GPIO_NUM_5
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST LMIC_UNUSED_PIN
|
||||
#define DIO0 GPIO_NUM_23 // LoRa IRQ
|
||||
#define DIO1 GPIO_NUM_23 // Pin tied via diode to DIO0
|
||||
#define DIO2 GPIO_NUM_23 // Pin tied via diode to DIO0
|
||||
#define DIO0 (23) // LoRa IRQ
|
||||
#define DIO1 (23) // Pin tied via diode to DIO0
|
||||
#define DIO2 (23) // Pin tied via diode to DIO0
|
||||
|
||||
// select WIFI antenna (internal = onboard / external = u.fl socket)
|
||||
#define HAS_ANTENNA_SWITCH GPIO_NUM_21 // pin for switching wifi antenna (P12)
|
||||
#define HAS_ANTENNA_SWITCH (21) // pin for switching wifi antenna (P12)
|
||||
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
|
||||
|
||||
// uncomment this only if your LoPy runs on a PYTRACK BOARD
|
||||
@@ -27,10 +28,12 @@
|
||||
//#define GPS_ADDR 0x10
|
||||
|
||||
// uncomment this only if your LoPy runs on a EXPANSION BOARD
|
||||
#define HAS_LED GPIO_NUM_12 // use if LoPy is on Expansion Board, this has a user LED
|
||||
#define HAS_LED (12) // use if LoPy is on Expansion Board, this has a user LED
|
||||
#define LED_ACTIVE_LOW 1 // use if LoPy is on Expansion Board, this has a user LED
|
||||
#define HAS_BUTTON GPIO_NUM_13 // user button on expansion board
|
||||
#define HAS_BUTTON (13) // user button on expansion board
|
||||
#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
||||
#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
|
||||
#define BATT_FACTOR 2 // voltage divider 1MOhm/1MOhm -> expansion board 3.0
|
||||
//#define BATT_FACTOR 4 // voltage divider 115kOhm/56kOhm -> expansion board 2.0
|
||||
//#define BATT_FACTOR 4 // voltage divider 115kOhm/56kOhm -> expansion board 2.0
|
||||
|
||||
#endif
|
||||
+19
-16
@@ -1,3 +1,8 @@
|
||||
#ifndef _OCTOPUS_H
|
||||
#define _OCTOPUS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for #IoT Octopus32 with the Adafruit LoRaWAN Wing
|
||||
// You can use this configuration also with the Adafruit ESP32 Feather + the LoRaWAN Wing
|
||||
// In this config we use the Adafruit OLED Wing which is only 128x32 pixel, need to find a smaller font
|
||||
@@ -15,27 +20,25 @@
|
||||
#define HAS_SPI 1 // comment out if device shall not send data via SPI
|
||||
#define CFG_sx1276_radio 1 // RFM95 module
|
||||
|
||||
/* SPI remapping does currently not work!! */
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS 14 //14 // ESP32 GPIO5 (Pin5) -- SX1276 NSS (Pin19) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI 18 // ESP32 GPIO23 (Pin23) -- SX1276 MOSI (Pin18) SPI Data Input
|
||||
#define PIN_SPI_MISO 19 // ESP32 GPIO19 (Pin19) -- SX1276 MISO (Pin17) SPI Data Output
|
||||
#define PIN_SPI_SCK 5 // ESP32 GPIO18 (Pin18) -- SX1276 SCK (Pin16) SPI Clock Input
|
||||
|
||||
//GPIO_NUM_
|
||||
// non arduino pin definitions
|
||||
#define RST LMIC_UNUSED_PIN // ESP32 GPIO25 (Pin25) -- SX1276 NRESET (Pin7) Reset Trigger Input
|
||||
#define DIO0 33 // ESP32 GPIO27 (Pin27) -- SX1276 DIO0 (Pin8) used by LMIC for detecting LoRa RX_Done & TX_Done
|
||||
#define DIO1 33 // ESP32 GPIO26 (Pin26) -- SX1276 DIO1 (Pin9) used by LMIC for detecting LoRa RX_Timeout
|
||||
#define DIO2 LMIC_UNUSED_PIN // 4 ESP32 GPIO4 (Pin4) -- SX1276 DIO2 (Pin10) not used by LMIC for LoRa (Timeout for FSK only)
|
||||
#define DIO5 LMIC_UNUSED_PIN // 35 ESP32 GPIO35 (Pin35) -- SX1276 DIO5 not used by LMIC for LoRa (Timeout for FSK only)
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST LMIC_UNUSED_PIN
|
||||
#define DIO0 (33)
|
||||
#define DIO1 (33)
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
#define DIO5 LMIC_UNUSED_PIN
|
||||
|
||||
// Hardware pin definitions for LoRaNode32 Board with OLED I2C Display
|
||||
#define OLED_RST U8X8_PIN_NONE // Not reset pin
|
||||
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C // U8X8_SSD1306_128X32_UNIVISION_SW_I2C //
|
||||
//#define DISPLAY_FLIP 1 // uncomment this for rotated display
|
||||
#define I2C_SDA 23 //21 // ESP32 GPIO14 (Pin14) -- OLED SDA
|
||||
#define I2C_SCL 22 //22 // ESP32 GPIO12 (Pin12) -- OLED SCL
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C // U8X8_SSD1306_128X32_UNIVISION_SW_I2C //
|
||||
//#define DISPLAY_FLIP 1 // uncomment this for rotated display
|
||||
#define MY_OLED_SDA (23)
|
||||
#define MY_OLED_SCL (22)
|
||||
#define MY_OLED_RST U8X8_PIN_NONE
|
||||
|
||||
// I2C config for Microchip 24AA02E64 DEVEUI unique address
|
||||
//#define MCP_24AA02E64_I2C_ADDRESS 0x50 // I2C address for the 24AA02E64
|
||||
//#define MCP_24AA02E64_MAC_ADDRESS 0xF8 // Memory adress of unique deveui 64 bits
|
||||
#endif
|
||||
+12
-11
@@ -1,3 +1,8 @@
|
||||
#ifndef _TTGOBEAM_H
|
||||
#define _TTGOBEAM_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for TTGO T-Beam board
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
@@ -14,15 +19,11 @@
|
||||
#define HAS_GPS 1 // use on board GPS
|
||||
#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M or 7M with default configuration
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- HPD13A NSS/SEL (Pin4) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // ESP32 GPIO27 (Pin27) -- HPD13A MOSI/DSI (Pin6) SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // ESP32 GPIO19 (Pin19) -- HPD13A MISO/DSO (Pin7) SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // ESP32 GPIO5 (Pin5) -- HPD13A SCK (Pin5) SPI Clock Input
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST LMIC_UNUSED_PIN
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (32) // !! NEEDS EXTERNAL WIRING !!
|
||||
//#define DIO1 (33) // for T-Beam T22_V05 and T22_V07, other versions may need external wiring
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST LMIC_UNUSED_PIN // connected to ESP32 RST/EN
|
||||
#define DIO0 GPIO_NUM_26 // ESP32 GPIO26 <-> HPD13A IO0
|
||||
#define DIO1 GPIO_NUM_32 // Lora1 <-> HPD13A IO1 // !! NEEDS EXTERNAL WIRING !!
|
||||
//#define DIO1 GPIO_NUM_33 // Lora1 <-> HPD13A IO1 // for T-Beam T22_V05 and T22_V07, other versions may need external wiring
|
||||
#define DIO2 LMIC_UNUSED_PIN // Lora2 <-> HPD13A IO2 // not needed for LoRa
|
||||
#endif
|
||||
+17
-16
@@ -1,3 +1,8 @@
|
||||
#ifndef _TTGOV1_H
|
||||
#define _TTGOV1_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for TTGOv1 board
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
@@ -6,23 +11,19 @@
|
||||
|
||||
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C // OLED-Display on board
|
||||
//#define DISPLAY_FLIP 1 // uncomment this for rotated display
|
||||
#define HAS_LED GPIO_NUM_2 // white LED on board
|
||||
#define HAS_LED (2) // white LED on board
|
||||
#define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW
|
||||
#define HAS_BUTTON GPIO_NUM_0 // button "PRG" on board
|
||||
#define HAS_BUTTON (0) // button "PRG" on board
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- SX1276 NSS (Pin19) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // ESP32 GPIO27 (Pin27) -- SX1276 MOSI (Pin18) SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // ESP32 GPIO19 (Pin19) -- SX1276 MISO (Pin17) SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // ESP32 GPIO5 (Pin5) -- SX1276 SCK (Pin16) SPI Clock Input
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define MY_OLED_SDA (4)
|
||||
#define MY_OLED_SCL (15)
|
||||
#define MY_OLED_RST (16)
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST GPIO_NUM_14 // ESP32 GPIO14 (Pin14) -- SX1276 NRESET (Pin7) Reset Trigger Input
|
||||
#define DIO0 GPIO_NUM_26 // ESP32 GPIO26 (Pin15) -- SX1276 DIO0 (Pin8) used by LMIC for detecting LoRa RX_Done & TX_Done
|
||||
#define DIO1 GPIO_NUM_33 // ESP32 GPIO33 (Pin13) -- SX1276 DIO1 (Pin9) used by LMIC for detecting LoRa RX_Timeout
|
||||
#define DIO2 LMIC_UNUSED_PIN // 32 ESP32 GPIO32 (Pin12) -- SX1276 DIO2 (Pin10) not used by LMIC for LoRa (Timeout for FSK only)
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (14)
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (33)
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
|
||||
// Hardware pin definitions for TTGOv1 Board with OLED SSD1306 I2C Display
|
||||
#define OLED_RST GPIO_NUM_16 // ESP32 GPIO16 (Pin16) -- SD1306 Reset
|
||||
#define I2C_SDA GPIO_NUM_4 // ESP32 GPIO4 (Pin4) -- SD1306 Data
|
||||
#define I2C_SCL GPIO_NUM_15 // ESP32 GPIO15 (Pin15) -- SD1306 Clock
|
||||
#endif
|
||||
+15
-41
@@ -1,3 +1,8 @@
|
||||
#ifndef _TTGOV2_H
|
||||
#define _TTGOV2_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// Hardware related definitions for TTGO V2 Board
|
||||
|
||||
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
||||
@@ -11,46 +16,15 @@
|
||||
// disable brownout detection (needed on TTGOv2 for battery powered operation)
|
||||
#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- HPD13A NSS/SEL (Pin4) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // ESP32 GPIO27 (Pin27) -- HPD13A MOSI/DSI (Pin6) SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // ESP32 GPIO19 (Pin19) -- HPD13A MISO/DSO (Pin7) SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // ESP32 GPIO5 (Pin5) -- HPD13A SCK (Pin5) SPI Clock Input
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define MY_OLED_SDA (21)
|
||||
#define MY_OLED_SCL (22)
|
||||
#define MY_OLED_RST U8X8_PIN_NONE
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST LMIC_UNUSED_PIN // connected to ESP32 RST/EN
|
||||
#define DIO0 GPIO_NUM_26 // ESP32 GPIO26 wired on PCB to HPD13A
|
||||
#define DIO1 GPIO_NUM_33 // HPDIO1 on pcb, needs to be wired external to GPIO33
|
||||
#define DIO2 LMIC_UNUSED_PIN // 32 HPDIO2 on pcb, needs to be wired external to GPIO32 (not necessary for LoRa, only FSK)
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST LMIC_UNUSED_PIN
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (33)
|
||||
#define DIO2 LMIC_UNUSED_PIN
|
||||
|
||||
// Hardware pin definitions for TTGO V2 Board with OLED SSD1306 0,96" I2C Display
|
||||
#define OLED_RST U8X8_PIN_NONE // connected to CPU RST/EN
|
||||
#define I2C_SDA GPIO_NUM_21 // ESP32 GPIO21 -- SD1306 D1+D2
|
||||
#define I2C_SCL GPIO_NUM_22 // ESP32 GPIO22 -- SD1306 D0
|
||||
|
||||
/* source:
|
||||
https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-2/11973
|
||||
|
||||
TTGO LoRa32 V2:
|
||||
ESP32 LoRa (SPI) Display (I2C) LED
|
||||
----------- ---------- ------------- ------------------
|
||||
GPIO5 SCK SCK
|
||||
GPIO27 MOSI MOSI
|
||||
GPIO19 MISO MISO
|
||||
GPIO18 SS NSS
|
||||
EN RST RST
|
||||
GPIO26 DIO0
|
||||
GPIO33 DIO1 (see #1)
|
||||
GPIO32 DIO2 (see #2)
|
||||
GPIO22 SCL SCL
|
||||
GPIO21 SDA SDA
|
||||
GPIO22 useless (see #3)
|
||||
|
||||
#1 Required (used by LMIC for LoRa).
|
||||
Not on-board wired to any GPIO. Must be manually wired. <<-- necessary for paxcounter
|
||||
|
||||
#2 Optional (used by LMIC for FSK but not for LoRa). <<-- NOT necessary for paxcounter
|
||||
Not on-board wired to any GPIO. When needed: must be manually wired.
|
||||
|
||||
#3 GPIO22 is already used for SCL therefore LED cannot be used without conflicting with I2C and display.
|
||||
*/
|
||||
#endif
|
||||
+16
-15
@@ -1,3 +1,8 @@
|
||||
#ifndef _TTGOV21NEW_H
|
||||
#define _TTGOV21NEW_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Hardware related definitions for TTGO V2.1 Board
|
||||
// ATTENTION: check your board version!
|
||||
// This settings are for boards labeled v1.6 on pcb, NOT for v1.5 or older
|
||||
@@ -8,23 +13,19 @@
|
||||
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
|
||||
|
||||
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C
|
||||
#define HAS_LED GPIO_NUM_25 // green on board LED
|
||||
#define HAS_LED (25) // green on board LED
|
||||
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // uses GPIO7
|
||||
#define BATT_FACTOR 2 // voltage divider 100k/100k on board
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- HPD13A NSS/SEL (Pin4) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // ESP32 GPIO27 (Pin27) -- HPD13A MOSI/DSI (Pin6) SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // ESP32 GPIO19 (Pin19) -- HPD13A MISO/DSO (Pin7) SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // ESP32 GPIO5 (Pin5) -- HPD13A SCK (Pin5) SPI Clock Input
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define MY_OLED_SDA (21)
|
||||
#define MY_OLED_SCL (22)
|
||||
#define MY_OLED_RST U8X8_PIN_NONE
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST GPIO_NUM_23 // ESP32 GPIO23 <-> HPD13A RESET
|
||||
#define DIO0 GPIO_NUM_26 // ESP32 GPIO26 <-> HPD13A IO0
|
||||
#define DIO1 GPIO_NUM_33 // ESP32 GPIO33 <-> HPDIO1 <-> HPD13A IO1
|
||||
#define DIO2 GPIO_NUM_32 // ESP32 GPIO32 <-> HPDIO2 <-> HPD13A IO2
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST (23)
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (33)
|
||||
#define DIO2 (32)
|
||||
|
||||
// Hardware pin definitions for TTGO V2 Board with OLED SSD1306 0,96" I2C Display
|
||||
#define OLED_RST U8X8_PIN_NONE // connected to CPU RST/EN
|
||||
#define I2C_SDA GPIO_NUM_21 // ESP32 GPIO21 -- SD1306 D1+D2
|
||||
#define I2C_SCL GPIO_NUM_22 // ESP32 GPIO22 -- SD1306 D0
|
||||
#endif
|
||||
+16
-15
@@ -1,3 +1,9 @@
|
||||
#ifndef _TTGOV21OLD_H
|
||||
#define _TTGOV21OLD_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
/* Hardware related definitions for TTGO V2.1 Board
|
||||
// ATTENTION: check your board version!
|
||||
// This settings are for boards without label on pcb, or labeled v1.5 on pcb
|
||||
@@ -14,20 +20,15 @@
|
||||
//#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // uses GPIO7
|
||||
//#define BATT_FACTOR 2 // voltage divider 100k/100k on board
|
||||
|
||||
// re-define pin definitions of pins_arduino.h
|
||||
#define PIN_SPI_SS GPIO_NUM_18 // ESP32 GPIO18 (Pin18) -- HPD13A NSS/SEL (Pin4) SPI Chip Select Input
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27 // ESP32 GPIO27 (Pin27) -- HPD13A MOSI/DSI (Pin6) SPI Data Input
|
||||
#define PIN_SPI_MISO GPIO_NUM_19 // ESP32 GPIO19 (Pin19) -- HPD13A MISO/DSO (Pin7) SPI Data Output
|
||||
#define PIN_SPI_SCK GPIO_NUM_5 // ESP32 GPIO5 (Pin5) -- HPD13A SCK (Pin5) SPI Clock Input
|
||||
// Pins for I2C interface of OLED Display
|
||||
#define MY_OLED_SDA (21)
|
||||
#define MY_OLED_SCL (22)
|
||||
#define MY_OLED_RST U8X8_PIN_NONE
|
||||
|
||||
// non arduino pin definitions
|
||||
#define RST LMIC_UNUSED_PIN // connected to ESP32 RST/EN (old board)
|
||||
//#define RST GPIO_NUM_12 // (boards labeled v1.5)
|
||||
#define DIO0 GPIO_NUM_26 // ESP32 GPIO26 <-> HPD13A IO0
|
||||
#define DIO1 GPIO_NUM_33 // ESP32 GPIO33 <-> HPDIO1 <-> HPD13A IO1
|
||||
#define DIO2 GPIO_NUM_32 // ESP32 GPIO32 <-> HPDIO2 <-> HPD13A IO2
|
||||
// Pins for LORA chip reset and interrupt lines
|
||||
#define RST LMIC_UNUSED_PIN
|
||||
#define DIO0 (26)
|
||||
#define DIO1 (33)
|
||||
#define DIO2 (32)
|
||||
|
||||
// Hardware pin definitions for TTGO V2 Board with OLED SSD1306 0,96" I2C Display
|
||||
#define OLED_RST U8X8_PIN_NONE // connected to CPU RST/EN
|
||||
#define I2C_SDA GPIO_NUM_21 // ESP32 GPIO21 -- SD1306 D1+D2
|
||||
#define I2C_SCL GPIO_NUM_22 // ESP32 GPIO22 -- SD1306 D0
|
||||
#endif
|
||||
Reference in new issue
Block a user