diff --git a/README.md b/README.md
index a3fb586b..ba287d48 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@ Tutorial (in german language): https://www.heise.de/select/make/2019/1/155109923
+
# Use case
@@ -54,7 +55,7 @@ Depending on board hardware following features are supported:
- Real Time Clock (Maxim DS3231 I2C)
- IF482 (serial) and DCF77 (gpio) time telegram generator
- Switch external power / battery
-- 64x16 pixel LED Matrix display (similar to [this model](https://www.instructables.com/id/64x16-RED-LED-Marquee/))
+- 64x16 pixel LED Matrix display (similar to [this model](https://www.instructables.com/id/64x16-RED-LED-Marquee/), can be ordered on [Aliexpress](https://www.aliexpress.com/item/P3-75-dot-matrix-led-module-3-75mm-high-clear-top1-for-text-display-304-60mm/32616683948.html))
Target platform must be selected in [platformio.ini](https://github.com/cyberman54/ESP32-Paxcounter/blob/master/platformio.ini).
Hardware dependent settings (pinout etc.) are stored in board files in /hal directory. If you want to use a ESP32 board which is not yet supported, use hal file generic.h and tailor pin mappings to your needs. Pull requests for new boards welcome.
@@ -93,7 +94,7 @@ If your device has a **real time clock** it can be updated bei either LoRaWAN ne
# Building
-Use PlatformIO with your preferred IDE for development and building this code. Make sure you have latest PlatformIO version, **at least v4.0.0a15**.
+Use PlatformIO with your preferred IDE for development and building this code. Make sure you have latest PlatformIO version.
# Uploading
diff --git a/build.py b/build.py
index e8f3d009..f7cf7e79 100644
--- a/build.py
+++ b/build.py
@@ -8,16 +8,22 @@ import requests
from os.path import basename
from platformio import util
+try:
+ import configparser
+except ImportError:
+ import ConfigParser as configparser
+
Import("env")
# get platformio environment variables
-project_config = util.load_project_config()
+config = configparser.ConfigParser()
+config.read("platformio.ini")
# get platformio source path
-srcdir = env.get("PROJECTSRC_DIR").replace("\\", "/")
+srcdir = env.get("PROJECTSRC_DIR")
# check if lmic config file is present in source directory
-lmicconfig = project_config.get("common", "lmicconfigfile")
+lmicconfig = config.get("common", "lmicconfigfile")
lmicconfigfile = os.path.join (srcdir, lmicconfig)
if os.path.isfile(lmicconfigfile) and os.access(lmicconfigfile, os.R_OK):
print "Parsing LMIC configuration from " + lmicconfigfile
@@ -25,14 +31,14 @@ else:
sys.exit("Missing file " + lmicconfigfile + ", please create it! Aborting.")
# check if lora key file is present in source directory
-lorakeyfile = os.path.join (srcdir, project_config.get("common", "lorakeyfile"))
+lorakeyfile = os.path.join (srcdir, config.get("common", "lorakeyfile"))
if os.path.isfile(lorakeyfile) and os.access(lorakeyfile, os.R_OK):
print "Parsing LORAWAN keys from " + lorakeyfile
else:
sys.exit("Missing file " + lorakeyfile + ", please create it! Aborting.")
# check if ota key file is present in source directory
-otakeyfile = os.path.join (srcdir, project_config.get("common", "otakeyfile"))
+otakeyfile = os.path.join (srcdir, config.get("common", "otakeyfile"))
if os.path.isfile(otakeyfile) and os.access(otakeyfile, os.R_OK):
print "Parsing OTA keys from " + otakeyfile
else:
@@ -51,7 +57,7 @@ repository = mykeys["BINTRAY_REPO"]
apitoken = mykeys["BINTRAY_API_TOKEN"]
# get bintray upload parameters from platformio environment
-version = project_config.get("common", "release_version")
+version = config.get("common", "release_version")
package = str(env.get("PIOENV"))
# put bintray user credentials to platformio environment
@@ -89,17 +95,20 @@ def publish_bintray(source, target, env):
"X-Bintray-Override": "1"
}
- r = requests.put(
- url,
- data=open(firmware_path, "rb"),
- headers=headers,
- auth=(user, apitoken))
+ r = None
+
+ try:
+ r = requests.put(url,
+ data=open(firmware_path, "rb"),
+ headers=headers,
+ auth=(user,apitoken))
+ r.raise_for_status()
+ except requests.exceptions.RequestException as e:
+ sys.stderr.write("Failed to submit package: %s\n" %
+ ("%s\n%s" % (r.status_code, r.text) if r else str(e)))
+ env.Exit(1)
- if r.status_code != 201:
- print("Failed to submit package: {0}\n{1}".format(
- r.status_code, r.text))
- else:
- print("The firmware has been successfuly published at Bintray.com!")
+ print("The firmware has been successfuly published at Bintray.com!")
# put build file name and upload command to platformio environment
env.Replace(
diff --git a/img/Paxcounter-LEDmatrix.jpg b/img/Paxcounter-LEDmatrix.jpg
new file mode 100644
index 00000000..cb69c9ce
Binary files /dev/null and b/img/Paxcounter-LEDmatrix.jpg differ
diff --git a/platformio.ini b/platformio.ini
index a413a17b..64e7fb1a 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -6,33 +6,33 @@
; ---> SELECT TARGET PLATFORM HERE! <---
[platformio]
-env_default = generic
-;env_default = ebox
-;env_default = eboxtube
-;env_default = ecopower
-;env_default = heltec
-;env_default = heltecv2
-;env_default = ttgov1
-;env_default = ttgov2
-;env_default = ttgov21old
-;env_default = ttgov21new
-;env_default = ttgobeam
-;env_default = ttgofox
-;env_default = lopy
-;env_default = lopy4
-;env_default = fipy
-;env_default = lolin32litelora
-;env_default = lolin32lora
-;env_default = lolin32lite
-;env_default = wemos32oled
-;env_default = octopus32
-;env_default = ecopower, eboxtube, heltec, ttgobeam, lopy4, lopy, ttgov21old, ttgov21new, ttgofox
+default_envs = generic
+;default_envs = ebox
+;default_envs = eboxtube
+;default_envs = ecopower
+;default_envs = heltec
+;default_envs = heltecv2
+;default_envs = ttgov1
+;default_envs = ttgov2
+;default_envs = ttgov21old
+;default_envs = ttgov21new
+;default_envs = ttgobeam
+;default_envs = ttgofox
+;default_envs = lopy
+;default_envs = lopy4
+;default_envs = fipy
+;default_envs = lolin32litelora
+;default_envs = lolin32lora
+;default_envs = lolin32lite
+;default_envs = wemos32oled
+;default_envs = octopus32
+;default_envs = ecopower, eboxtube, heltec, ttgobeam, lopy4, lopy, ttgov21old, ttgov21new, ttgofox
;
description = Paxcounter is a proof-of-concept ESP32 device for metering passenger flows in realtime. It counts how many mobile devices are around.
[common]
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
-release_version = 1.7.61
+release_version = 1.7.62
; 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 = 3
@@ -51,7 +51,7 @@ lib_deps_lora =
;MCCI LoRaWAN LMIC library@2.3.2
https://github.com/mcci-catena/arduino-lmic.git
lib_deps_display =
- U8g2@>=2.25.7
+ U8g2@>=2.26.13
lib_deps_matrix_display =
https://github.com/Seeed-Studio/Ultrathin_LED_Matrix.git
lib_deps_rgbled =
@@ -63,8 +63,8 @@ lib_deps_sensors =
Adafruit BME280 Library@1.0.8
lib_deps_basic =
ArduinoJson@^5.13.1
- Timezone@^1.2.2
- RTC@^2.3.3
+ 76@^1.2.2 ;Timezone by Jack Christensen
+ 274@^2.3.3 ;RTC by Michael Miller
SimpleButton
lib_deps_all =
${common.lib_deps_basic}