Merge pull request #246 from cyberman54/master

sync dev to master
This commit is contained in:
Verkehrsrot 2019-01-19 10:01:05 +01:00 committed by GitHub
commit b7a95d9ca9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 2 deletions

View File

@ -7,6 +7,7 @@
<img src="img/Paxcounter-ttgo.jpg">
<img src="img/Paxcounter-lolin.gif">
<img src="img/Paxcounter-Screen.png">
<img src="img/paxcounter-curves.jpg">
# Use case

BIN
img/paxcounter-curves.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -16,6 +16,7 @@ env_default = generic
;env_default = ttgov21old
;env_default = ttgov21new
;env_default = ttgobeam
;env_default = ttgofox
;env_default = lopy
;env_default = lopy4
;env_default = fipy
@ -32,14 +33,13 @@ description = Paxcounter is a proof-of-concept ESP32 device for metering passeng
release_version = 1.7.11
; 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
debug_level = 0
debug_level = 3
; UPLOAD MODE: select esptool to flash via USB/UART, select custom to upload to cloud for OTA
upload_protocol = esptool
;upload_protocol = custom
extra_scripts = pre:build.py
keyfile = ota.conf
platform_espressif32 = espressif32@1.6.0
;platform_espressif32 = https://github.com/platformio/platform-espressif32.git#feature/stage
board_build.partitions = min_spiffs.csv
monitor_speed = 115200
lib_deps_lora =
@ -202,6 +202,22 @@ upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
monitor_speed = ${common.monitor_speed}
[env:ttgofox]
platform = ${common.platform_espressif32}
framework = arduino
board = esp32dev
board_build.partitions = ${common.board_build.partitions}
upload_speed = 921600
lib_deps =
${common.lib_deps_basic}
${common.lib_deps_lora}
${common.lib_deps_display}
build_flags =
${common.build_flags_basic}
upload_protocol = ${common.upload_protocol}
extra_scripts = ${common.extra_scripts}
monitor_speed = ${common.monitor_speed}
[env:ttgobeam]
platform = ${common.platform_espressif32}
framework = arduino

33
src/hal/ttgofox.h Normal file
View File

@ -0,0 +1,33 @@
// clang-format off
#ifndef _TTGOFOX_H
#define _TTGOFOX_H
#include <stdint.h>
#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C
#define HAS_LED NOT_A_PIN // green on board LED
//#define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // uses GPIO7
#define BATT_FACTOR 2 // voltage divider 100k/100k on board
#define HAS_BUTTON GPIO_NUM_36 // on board button (next to reset)
// Pins for I2C interface of OLED Display
#define MY_OLED_SDA (21)
#define MY_OLED_SCL (22)
#define MY_OLED_RST U8X8_PIN_NONE
// 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)
#define LORA_IO2 (32)
#endif