This commit is contained in:
Klaus K Wilting 2019-01-11 18:32:50 +01:00
parent 48b68653ab
commit 613ec488fe
3 changed files with 29 additions and 58 deletions

View File

@ -15,8 +15,7 @@ env_default = generic
;env_default = ttgov2 ;env_default = ttgov2
;env_default = ttgov21old ;env_default = ttgov21old
;env_default = ttgov21new ;env_default = ttgov21new
;env_default = ttgobeam_old ;env_default = ttgobeam
;env_default = ttgobeam_new
;env_default = lopy ;env_default = lopy
;env_default = lopy4 ;env_default = lopy4
;env_default = fipy ;env_default = fipy
@ -30,7 +29,7 @@ description = Paxcounter is a proof-of-concept ESP32 device for metering passeng
[common] [common]
; for release_version use max. 10 chars total, use any decimal format like "a.b.c" ; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
release_version = 1.7.08 release_version = 1.7.11
; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running! ; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose ; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
debug_level = 0 debug_level = 0
@ -39,8 +38,8 @@ upload_protocol = esptool
;upload_protocol = custom ;upload_protocol = custom
extra_scripts = pre:build.py extra_scripts = pre:build.py
keyfile = ota.conf keyfile = ota.conf
;platform_espressif32 = espressif32@1.5.0 platform_espressif32 = espressif32@1.6.0
platform_espressif32 = https://github.com/platformio/platform-espressif32.git#feature/stage ;platform_espressif32 = https://github.com/platformio/platform-espressif32.git#feature/stage
board_build.partitions = min_spiffs.csv board_build.partitions = min_spiffs.csv
monitor_speed = 115200 monitor_speed = 115200
lib_deps_lora = lib_deps_lora =
@ -63,7 +62,7 @@ lib_deps_all =
build_flags_basic = build_flags_basic =
-include "src/hal/${PIOENV}.h" -include "src/hal/${PIOENV}.h"
-include "src/paxcounter.conf" -include "src/paxcounter.conf"
; -w -w
'-DARDUINO_LMIC_PROJECT_CONFIG_H=../../../src/lmic_config.h' '-DARDUINO_LMIC_PROJECT_CONFIG_H=../../../src/lmic_config.h'
'-DCORE_DEBUG_LEVEL=${common.debug_level}' '-DCORE_DEBUG_LEVEL=${common.debug_level}'
'-DLOG_LOCAL_LEVEL=${common.debug_level}' '-DLOG_LOCAL_LEVEL=${common.debug_level}'
@ -203,17 +202,17 @@ upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
monitor_speed = ${common.monitor_speed} monitor_speed = ${common.monitor_speed}
[env:ttgobeam_old] [env:ttgobeam]
platform = ${common.platform_espressif32} platform = ${common.platform_espressif32}
framework = arduino framework = arduino
board = esp32dev board = ttgo-t-beam
;board = ttgo-t-beam
board_build.partitions = ${common.board_build.partitions} board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600 upload_speed = 921600
lib_deps = lib_deps =
${common.lib_deps_basic} ${common.lib_deps_basic}
${common.lib_deps_lora} ${common.lib_deps_lora}
${common.lib_deps_gps} ${common.lib_deps_gps}
; ${common.lib_deps_display}
build_flags = build_flags =
${common.build_flags_all} ${common.build_flags_all}
-mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-issue
@ -221,25 +220,6 @@ upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
monitor_speed = ${common.monitor_speed} monitor_speed = ${common.monitor_speed}
[env:ttgobeam_new]
platform = ${common.platform_espressif32}
framework = arduino
board = esp32dev
;board = ttgo-t-beam
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_gps}
build_flags =
${common.build_flags_all}
-mfix-esp32-psram-cache-issue
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
monitor_speed = ${common.monitor_speed}
[env:fipy] [env:fipy]
platform = ${common.platform_espressif32} platform = ${common.platform_espressif32}
framework = arduino framework = arduino
@ -360,4 +340,4 @@ lib_deps = ${common.lib_deps_all}
build_flags = ${common.build_flags_all} build_flags = ${common.build_flags_all}
upload_protocol = ${common.upload_protocol} upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
monitor_speed = ${common.monitor_speed} monitor_speed = ${common.monitor_speed}

View File

@ -6,46 +6,37 @@
#include <stdint.h> #include <stdint.h>
// Hardware related definitions for TTGO T-Beam board // Hardware related definitions for TTGO T-Beam board
// (only) for older T-Beam version T22_V05 eternal wiring LORA_IO1 to GPIO33 is needed!
// //
// pinouts taken from http://tinymicros.com/wiki/TTGO_T-Beam // pinouts taken from http://tinymicros.com/wiki/TTGO_T-Beam
#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 BOARD_HAS_PSRAM // use extra 4MB external RAM
#define HAS_BUTTON GPIO_NUM_39 // on board button (next to reset)
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BATT_FACTOR 2 // voltage divider 100k/100k on board
#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
// enable only if device has these sensors, otherwise comment these lines // enable only if device has these sensors, otherwise comment these lines
// BME680 sensor on I2C bus // BME680 sensor on I2C bus
//#define HAS_BME GPIO_NUM_21, GPIO_NUM_22 // SDA, SCL //#define HAS_BME GPIO_NUM_21, GPIO_NUM_22 // SDA, SCL
//#define BME_ADDR BME680_I2C_ADDR_PRIMARY // connect SDIO of BME680 to GND //#define BME_ADDR BME680_I2C_ADDR_PRIMARY // connect SDIO of BME680 to GND
#define HAS_LED GPIO_NUM_14 // on board green LED // display (if connected)
// user defined sensors
//#define HAS_SENSORS 1 // comment out if device has user defined sensors
//#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C //#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C
//#define MY_OLED_SDA (21) //#define MY_OLED_SDA (21)
//#define MY_OLED_SCL (22) //#define MY_OLED_SCL (22)
//#define MY_OLED_RST U8X8_PIN_NONE //#define MY_OLED_RST U8X8_PIN_NONE
//#define DISPLAY_FLIP 1 // use if display is rotated //#define DISPLAY_FLIP 1 // use if display is rotated
#define HAS_LORA 1 // comment out if device shall not send data via LoRa // user defined sensors (if connected)
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC //#define HAS_SENSORS 1 // comment out if device has user defined sensors
#define BOARD_HAS_PSRAM // use extra 4MB external RAM
//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature //#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
#define HAS_BUTTON GPIO_NUM_39 // on board button "SW5"
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
#define BATT_FACTOR 2 // voltage divider 100k/100k on board
#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
// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_RST (23)
#define LORA_IRQ (26)
#define LORA_IO1 (33) // for T-Beam T22_V05 and T22_V07, for other versions use ttgobeam_old.h
#define LORA_IO2 (32)
#endif #endif

View File

@ -9,11 +9,11 @@
// enable only if device has these sensors, otherwise comment these lines // enable only if device has these sensors, otherwise comment these lines
// BME680 sensor on I2C bus // BME680 sensor on I2C bus
//#define HAS_BME GPIO_NUM_21, GPIO_NUM_22 // SDA, SCL #define HAS_BME GPIO_NUM_21, GPIO_NUM_22 // SDA, SCL
//#define BME_ADDR BME680_I2C_ADDR_PRIMARY // connect SDIO of BME680 to GND #define BME_ADDR BME680_I2C_ADDR_PRIMARY // connect SDIO of BME680 to GND
//#define HAS_LED NOT_A_PIN // on board green LED uses same GPIO as SDA! #define HAS_LED NOT_A_PIN // on board green LED uses same GPIO as SDA!
#define HAS_LED GPIO_NUM_21 // on board green LED // #define HAS_LED GPIO_NUM_21 // on board green LED
// user defined sensors // user defined sensors
//#define HAS_SENSORS 1 // comment out if device has user defined sensors //#define HAS_SENSORS 1 // comment out if device has user defined sensors