commit
b4010d2b7b
@ -1,7 +1,7 @@
|
||||
# ESP32-Paxcounter
|
||||
**Wifi & Bluetooth driven, LoRaWAN enabled, battery powered mini Paxcounter built on cheap ESP32 LoRa IoT boards**
|
||||
|
||||
--> see development branch of this repository for latest alpha version <--
|
||||
Tutorial (in german language): https://www.heise.de/select/make/2019/1/1551099236518668
|
||||
|
||||
<img src="img/Paxcounter-title.jpg">
|
||||
<img src="img/Paxcounter-ttgo.jpg">
|
||||
@ -396,3 +396,4 @@ Thanks to
|
||||
- [Charles Hallard](https://github.com/hallard) for major code contributions to this project
|
||||
- [robbi5](https://github.com/robbi5) for the payload converter
|
||||
- [terrillmoore](https://github.com/mcci-catena) for maintaining the LMIC for arduino LoRaWAN stack
|
||||
- [sbamueller](https://github.com/sbamueller) for writing the tutorial in Make Magazine
|
||||
|
@ -10,7 +10,7 @@ function Decoder(bytes, port) {
|
||||
if (bytes.length >= 2) {
|
||||
decoded.wifi = (bytes[i++] << 8) | bytes[i++];}
|
||||
|
||||
if (bytes.length >= 4) {
|
||||
if (bytes.length === 4 || bytes.length > 15) {
|
||||
decoded.ble = (bytes[i++] << 8) | bytes[i++];}
|
||||
|
||||
if (bytes.length > 4) {
|
||||
@ -60,7 +60,13 @@ function Decoder(bytes, port) {
|
||||
decoded.humidity = ((bytes[i++] << 8) | bytes[i++]);
|
||||
decoded.air = ((bytes[i++] << 8) | bytes[i++]);
|
||||
}
|
||||
|
||||
if (port === 8) {
|
||||
var i = 0;
|
||||
if (bytes.length >= 2) {
|
||||
decoded.battery = (bytes[i++] << 8) | bytes[i++];}
|
||||
}
|
||||
|
||||
return decoded;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
// GPS settings
|
||||
#define HAS_GPS 1 // use on board GPS
|
||||
#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M
|
||||
#define GPS_INT GPIO_NUM_34 // 30ns accurary timepulse, to be external wired on pcb: NEO 6M Pin#3 -> GPIO34
|
||||
//#define GPS_INT GPIO_NUM_34 // 30ns accurary timepulse, to be external wired on pcb: NEO 6M Pin#3 -> GPIO34
|
||||
|
||||
// Settings for on board DS3231 RTC chip
|
||||
//#define HAS_RTC MY_OLED_SDA, MY_OLED_SCL // SDA, SCL
|
||||
@ -52,4 +52,4 @@
|
||||
|
||||
//#define DISABLE_BROWNOUT 1 // comment out if you want to keep brownout feature
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user