Skip to content

Commit

Permalink
PINOUT 5 for Heltec Wifi LoRA 32(V2)
Browse files Browse the repository at this point in the history
  • Loading branch information
joerg555 committed May 15, 2020
1 parent 659ca99 commit 97aa14a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
22 changes: 22 additions & 0 deletions src/loraModem.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,28 @@ struct pins {
#define GPS_TX 12
#endif // _GPS

#elif _PIN_OUT==5

// ----------------------------------------------------------------------------
// For ESP32/Heltec Wifi LoRA 32(V2) HTIT-WB32LA board with 0.9" OLED
//
// SCK == GPIO5/ PIN5
// SS == GPIO18/PIN18 CS
// MISO == GPIO19/ PIN19
// MOSI == GPIO27/ PIN27
// RST == GPIO14/ PIN14
struct pins {
uint8_t dio0=26; // GPIO26 / Dio0 used for one frequency and one SF
uint8_t dio1=35; // GPIO35 / Used for CAD, may or not be shared with DIO0
uint8_t dio2=34; // GPIO34 / Used for frequency hopping, don't care
uint8_t ss=18; // GPIO18 / Dx. Select pin connected to GPIO18
uint8_t rst=14; // GPIO0 / D3. Reset pin not used
} pins;
#define SCK 5 // Check
#define MISO 19 // Check
#define MOSI 27 // Check
#define RST 14 // Check
#define SS 18

#else
// ----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions src/oLED.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
#define OLED_SDA 4 // GPIO4 /
#define OLED_RST 16 // Reset pin (Some OLED displays do not have it)

#elif _PIN_OUT==5 // TTGO with external OLED
#define OLED_SCL 22 // GPIO22 / SCL
#define OLED_SDA 21 // GPIO21 / SDA
#define OLED_RST 16 // Reset pin (Some OLED displays do not have it)
#elif _PIN_OUT==5 // Heltec Wifi LoRA 32(V2) onboard OLED
#define OLED_SCL 15 // GPIO22 / SCL
#define OLED_SDA 4 // GPIO21 / SDA
#define OLED_RST 16 // Reset pin

#endif

Expand Down

0 comments on commit 97aa14a

Please sign in to comment.