2018-11-25 16:35:36 +01:00
|
|
|
// clang-format off
|
|
|
|
|
2018-10-21 19:00:20 +02:00
|
|
|
#ifndef _TTGOBEAM_H
|
|
|
|
#define _TTGOBEAM_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2018-06-06 20:01:08 +02:00
|
|
|
// Hardware related definitions for TTGO T-Beam board
|
2018-12-17 10:42:34 +01:00
|
|
|
//
|
|
|
|
// pinouts taken from http://tinymicros.com/wiki/TTGO_T-Beam
|
2018-12-26 23:01:54 +01:00
|
|
|
|
2018-11-20 21:24:35 +01:00
|
|
|
// enable only if device has these sensors, otherwise comment these lines
|
2018-11-22 23:37:53 +01:00
|
|
|
// BME680 sensor on I2C bus
|
2018-12-31 11:26:05 +01:00
|
|
|
//#define HAS_BME GPIO_NUM_21, GPIO_NUM_22 // SDA, SCL
|
|
|
|
//#define BME_ADDR BME680_I2C_ADDR_PRIMARY // connect SDIO of BME680 to GND
|
2018-12-17 10:30:56 +01:00
|
|
|
|
|
|
|
#define HAS_LED GPIO_NUM_14 // on board green LED
|
2018-11-25 16:05:30 +01:00
|
|
|
|
2018-11-22 23:37:53 +01:00
|
|
|
// user defined sensors
|
2018-11-20 21:24:35 +01:00
|
|
|
//#define HAS_SENSORS 1 // comment out if device has user defined sensors
|
2018-11-20 15:44:33 +01:00
|
|
|
|
2018-12-31 11:26:05 +01:00
|
|
|
//#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C
|
|
|
|
//#define MY_OLED_SDA (21)
|
|
|
|
//#define MY_OLED_SCL (22)
|
|
|
|
//#define MY_OLED_RST U8X8_PIN_NONE
|
2018-12-21 00:35:21 +01:00
|
|
|
//#define DISPLAY_FLIP 1 // use if display is rotated
|
|
|
|
|
2018-08-11 19:12:04 +02:00
|
|
|
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
|
2018-06-06 20:01:08 +02:00
|
|
|
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
|
2018-07-31 00:00:24 +02:00
|
|
|
#define BOARD_HAS_PSRAM // use extra 4MB external RAM
|
2018-12-17 10:30:56 +01:00
|
|
|
|
|
|
|
//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
|
2018-07-21 19:24:43 +02:00
|
|
|
|
2018-12-17 10:42:34 +01:00
|
|
|
#define HAS_BUTTON GPIO_NUM_39 // on board button "SW5"
|
2018-06-06 20:01:08 +02:00
|
|
|
|
2018-06-10 21:46:58 +02:00
|
|
|
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
|
2018-06-06 20:01:08 +02:00
|
|
|
#define BATT_FACTOR 2 // voltage divider 100k/100k on board
|
2018-06-10 21:46:58 +02:00
|
|
|
#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
|
2018-06-06 20:01:08 +02:00
|
|
|
|
2018-10-21 22:24:45 +02:00
|
|
|
// Pins for LORA chip SPI interface, reset line and interrupt lines
|
2018-10-21 22:16:29 +02:00
|
|
|
#define LORA_SCK (5)
|
|
|
|
#define LORA_CS (18)
|
|
|
|
#define LORA_MISO (19)
|
|
|
|
#define LORA_MOSI (27)
|
2018-12-17 10:42:34 +01:00
|
|
|
#define LORA_RST (23)
|
2018-11-20 15:02:37 +01:00
|
|
|
#define LORA_IRQ (26)
|
2018-12-17 10:30:56 +01:00
|
|
|
#define LORA_IO1 (33) // for T-Beam T22_V05 and T22_V07, for other versions use ttgobeam_old.h
|
|
|
|
#define LORA_IO2 (32)
|
2018-10-21 19:00:20 +02:00
|
|
|
|
2018-12-17 10:30:56 +01:00
|
|
|
#endif
|