ESP32-PaxCounter/src/hal/ttgobeam.h

48 lines
1.7 KiB
C
Raw Normal View History

2018-11-25 16:35:36 +01:00
// clang-format off
2019-06-30 17:48:24 +02:00
// upload_speed 921600
// board ttgo-t-beam
2018-11-25 16:35:36 +01: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
2019-01-11 18:32:50 +01:00
// (only) for older T-Beam version T22_V05 eternal wiring LORA_IO1 to GPIO33 is needed!
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
2019-01-11 18:32:50 +01:00
#define HAS_LED GPIO_NUM_14 // on board green LED, only new version TTGO-BEAM V07
//#define HAS_LED GPIO_NUM_21 // on board green LED, only old verison TTGO-BEAM V05
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
#define HAS_BUTTON GPIO_NUM_39 // on board button (next to reset)
2019-03-23 11:02:47 +01:00
#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 100k/100k on board
2019-02-09 13:02:38 +01:00
// GPS settings
2019-02-20 23:37:31 +01:00
#define HAS_GPS 1 // use on board GPS
#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M
2019-07-25 23:25:33 +02:00
//#define GPS_INT GPIO_NUM_34 // 30ns accurary timepulse, to be external wired on pcb: NEO 6M Pin#3 -> GPIO34
2019-01-11 18:32:50 +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
2019-10-13 16:59:56 +02:00
//#define HAS_BME 1 // Enable BME sensors in general
//#define HAS_BME680 SDA, SCL
//#define BME680_ADDR BME680_I2C_ADDR_PRIMARY // !! connect SDIO of BME680 to GND !!
2018-12-17 10:30:56 +01:00
2019-01-11 18:32:50 +01:00
// display (if connected)
2020-09-27 18:19:16 +02:00
//#define HAS_DISPLAY 1
#define MY_DISPLAY_SDA SDA
#define MY_DISPLAY_SCL SCL
#define MY_DISPLAY_RST NOT_A_PIN
//#define MY_DISPLAY_FLIP 1 // use if display is rotated
2018-12-21 00:35:21 +01:00
2019-01-11 18:32:50 +01:00
// user defined sensors (if connected)
//#define HAS_SENSORS 1 // comment out if device has user defined sensors
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
2019-02-20 23:37:31 +01:00
#endif