V2.1 18.07.20 added support for ESP8266 based Wifi Kit 8

(by Pulsar07/           (https://heltec.org/project/wifi-kit-8/)
   R.Stransky             is a ESP8266 with
                          * a build in OLED 128x32
                          * battery connector with charging management
                          * reset and GPIO0 button
                        support for a tare button (PIN_TARE_BUTTON)
                        bug fixed: wifi password now with up to 64 chars
                        bug fixed: wifi data (ssid/passwd) with special
                          character (e.g. +) is now supported
                        for specified battery type, voltage is displayed
                        using uncompressed html files makes WEB GUI much faster
This commit is contained in:
Rainer Stransky
2020-07-18 12:31:16 +02:00
parent 1ce3c18ada
commit 3cf22bb65a
9 changed files with 2759 additions and 135 deletions

View File

@@ -45,15 +45,33 @@ CG scale with 3 Loadcells:
*/
#define PIN_LOADCELL1_DOUT D6
#define PIN_LOADCELL1_PD_SCK D5
#define PIN_LOADCELL2_DOUT D2
#define PIN_LOADCELL2_PD_SCK D1
// Wifi Kit 8 (https://heltec.org/project/wifi-kit-8/)
// is a ESP8266 based board, with integrated OLED and battery management
// #define WIFI_KIT_8 1
#ifdef WIFI_KIT_8
#define PIN_LOADCELL1_DOUT D6
#define PIN_LOADCELL1_PD_SCK D7
#define PIN_LOADCELL3_DOUT D7
#define PIN_LOADCELL3_PD_SCK D0
#define PIN_LOADCELL2_DOUT D3
#define PIN_LOADCELL2_PD_SCK D8
#define PIN_LOADCELL3_DOUT D0
#define PIN_LOADCELL3_PD_SCK D0
// D3 can be used in parallel to the load cell with Wifi Kit 8
#define PIN_TARE_BUTTON D3
#else
#define PIN_LOADCELL1_DOUT D6
#define PIN_LOADCELL1_PD_SCK D5
#define PIN_LOADCELL2_DOUT D2
#define PIN_LOADCELL2_PD_SCK D1
#define PIN_LOADCELL3_DOUT D7
#define PIN_LOADCELL3_PD_SCK D0
#endif
// **** Measurement settings ****
@@ -81,9 +99,13 @@ CG scale with 3 Loadcells:
// Please UNCOMMENT the display used
U8G2_SH1106_128X64_NONAME_1_HW_I2C oledDisplay(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ D3, /* data=*/ D4);
//U8G2_SSD1306_128X64_NONAME_1_HW_I2C oledDisplay(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ D3, /* data=*/ D4);
#ifdef WIFI_KIT_8
// Wifi Kit 8 has a fixed wired 128x32 display
U8G2_SSD1306_128X32_UNIVISION_1_HW_I2C oledDisplay(U8G2_R0, /* reset=*/ 16, /* clock=*/ 5, /* data=*/ 4);
#else
U8G2_SH1106_128X64_NONAME_1_HW_I2C oledDisplay(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ D3, /* data=*/ D4);
//U8G2_SSD1306_128X64_NONAME_1_HW_I2C oledDisplay(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ D3, /* data=*/ D4);
#endif
// **** Voltage measurement settings ****
@@ -129,7 +151,7 @@ U8G2_SH1106_128X64_NONAME_1_HW_I2C oledDisplay(U8G2_R0, /* reset=*/ U8X8_PIN_NON
// **** Wifi settings ****
#define MAX_SSID_PW_LENGHT 32
#define MAX_SSID_PW_LENGHT 64
// Station mode: connect to available network
#define SSID_STA "myWiFi"