Merge branch 'master' of https://github.com/cyberman54/ESP32-Paxcounter
This commit is contained in:
commit
1a381ef2fa
@ -36,7 +36,7 @@ function Decoder(bytes, port) {
|
||||
var bytesToInt = function (bytes) {
|
||||
var i = 0;
|
||||
for (var x = 0; x < bytes.length; x++) {
|
||||
i |= +(bytes[x] << (x * 8));
|
||||
i |= (bytes[x] << (x * 8));
|
||||
}
|
||||
return i;
|
||||
};
|
||||
@ -124,7 +124,7 @@ var bitmap = function (byte) {
|
||||
var bm = ('00000000' + Number(i).toString(2)).substr(-8).split('').map(Number).map(Boolean);
|
||||
return ['adr', 'screensaver', 'screen', 'countermode', 'blescan', 'antenna', 'filter', 'gpsmode']
|
||||
.reduce(function (obj, pos, index) {
|
||||
obj[pos] = bm[index];
|
||||
obj[pos] = +bm[index];
|
||||
return obj;
|
||||
}, {});
|
||||
};
|
||||
|
@ -4,15 +4,6 @@
|
||||
#define HAS_LED NOT_A_PIN // LoPy4 has no on board LED, so we use RGB LED on LoPy4
|
||||
#define HAS_RGB_LED GPIO_NUM_0 // WS2812B RGB LED on GPIO0
|
||||
|
||||
// !!EXPERIMENTAL - not tested yet!!
|
||||
// uncomment this only if your LoPy runs on a Pytrack expansion board with GPS
|
||||
// see http://www.quectel.com/UploadImage/Downlad/Quectel_L76-L_I2C_Application_Note_V1.0.pdf
|
||||
//#define HAS_GPS 1
|
||||
//#define GPS_QUECTEL_L76 GPIO_NUM_25, GPIO_NUM_26 // SDA (P22), SCL (P21)
|
||||
//#define GPS_ADDR 0x10
|
||||
//#define HAS_BUTTON GPIO_NUM_37 // (P14)
|
||||
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
||||
|
||||
// Hardware pin definitions for Pycom LoPy board
|
||||
#define PIN_SPI_SS GPIO_NUM_17
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27
|
||||
@ -26,3 +17,24 @@
|
||||
// select WIFI antenna (internal = onboard / external = u.fl socket)
|
||||
#define HAS_ANTENNA_SWITCH 16 // pin for switching wifi antenna
|
||||
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
|
||||
|
||||
// !!EXPERIMENTAL - not tested yet!!
|
||||
// uncomment this only if your LoPy runs on a Pytrack expansion board with GPS
|
||||
// see http://www.quectel.com/UploadImage/Downlad/Quectel_L76-L_I2C_Application_Note_V1.0.pdf
|
||||
//#define HAS_GPS 1
|
||||
//#define GPS_QUECTEL_L76 GPIO_NUM_25, GPIO_NUM_26 // SDA (P22), SCL (P21)
|
||||
//#define GPS_ADDR 0x10
|
||||
//#define HAS_BUTTON GPIO_NUM_37 // (P14)
|
||||
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
||||
|
||||
// uncomment this only if your LoPy runs on a expansion board 3.0
|
||||
//#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
|
||||
//#define BATT_FACTOR 2 // voltage divider 1MOhm/1MOhm on board
|
||||
//#define HAS_BUTTON GPIO_NUM_37 // (P14)
|
||||
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
||||
|
||||
// uncomment this only if your LoPy runs on a expansion board 2.0
|
||||
//#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
|
||||
//#define BATT_FACTOR 4 // voltage divider 115kOhm/56kOhm on board
|
||||
//#define HAS_BUTTON GPIO_NUM_13 // (P10)
|
||||
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
||||
|
@ -4,15 +4,6 @@
|
||||
#define HAS_LED NOT_A_PIN // LoPy4 has no on board LED, so we use RGB LED on LoPy4
|
||||
#define HAS_RGB_LED GPIO_NUM_0 // WS2812B RGB LED on GPIO0
|
||||
|
||||
// !!EXPERIMENTAL - not tested yet!!
|
||||
// uncomment this only if your LoPy runs on a Pytrack expansion board with GPS
|
||||
// see http://www.quectel.com/UploadImage/Downlad/Quectel_L76-L_I2C_Application_Note_V1.0.pdf
|
||||
//#define HAS_GPS 1
|
||||
//#define GPS_QUECTEL_L76 GPIO_NUM_25, GPIO_NUM_26 // SDA (P22), SCL (P21)
|
||||
//#define GPS_ADDR 0x10
|
||||
//#define HAS_BUTTON GPIO_NUM_37 // (P14)
|
||||
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
||||
|
||||
// Hardware pin definitions for Pycom LoPy4 board
|
||||
#define PIN_SPI_SS GPIO_NUM_18
|
||||
#define PIN_SPI_MOSI GPIO_NUM_27
|
||||
@ -25,4 +16,25 @@
|
||||
|
||||
// select WIFI antenna (internal = onboard / external = u.fl socket)
|
||||
#define HAS_ANTENNA_SWITCH 21 // pin for switching wifi antenna
|
||||
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
|
||||
#define WIFI_ANTENNA 0 // 0 = internal, 1 = external
|
||||
|
||||
// !!EXPERIMENTAL - not tested yet!!
|
||||
// uncomment this only if your LoPy runs on a Pytrack expansion board with GPS
|
||||
// see http://www.quectel.com/UploadImage/Downlad/Quectel_L76-L_I2C_Application_Note_V1.0.pdf
|
||||
//#define HAS_GPS 1
|
||||
//#define GPS_QUECTEL_L76 GPIO_NUM_25, GPIO_NUM_26 // SDA (P22), SCL (P21)
|
||||
//#define GPS_ADDR 0x10
|
||||
//#define HAS_BUTTON GPIO_NUM_37 // (P14)
|
||||
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
||||
|
||||
// uncomment this only if your LoPy runs on a expansion board 3.0
|
||||
//#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
|
||||
//#define BATT_FACTOR 2 // voltage divider 1MOhm/1MOhm on board
|
||||
//#define HAS_BUTTON GPIO_NUM_37 // (P14)
|
||||
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
||||
|
||||
// uncomment this only if your LoPy runs on a expansion board 2.0
|
||||
//#define HAS_BATTERY_PROBE ADC1_GPIO39_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
|
||||
//#define BATT_FACTOR 4 // voltage divider 115kOhm/56kOhm on board
|
||||
//#define HAS_BUTTON GPIO_NUM_13 // (P10)
|
||||
//#define BUTTON_PULLUP 1 // Button need pullup instead of default pulldown
|
Loading…
Reference in New Issue
Block a user