/* Rui Santos Complete project details at https://RandomNerdTutorials.com/esp32-webserial-library/ This sketch is based on the WebSerial library example: ESP32_Demo https://github.com/ayushsharma82/WebSerial */#define Version "04/12/2022" // PB résolu avec TeraTerm terminal // suppression des sorties Serial.print (en doublons avec Webserial.print //#define Version "03/12/2022" // testé OK mais PB avec YAT terminal /* enregistrement page Webserial : 283 lignes => presque 10 minutes (2sec /ligne) {"DS18B20":"17.00","Cpt":"179","Pression":"983.75","Temperature":"17.40","Humidity":"58.20"} .... etc .... {"DS18B20":"17.00","Cpt":"462","Pression":"982.75","Temperature":"18.10","Humidity":"54.80"}* */ #include #include #include #include #include //#include // pas de OLED #include #include #include #include #include #include const int LED_I = 2; // inbuilt Led const int LED_Bleue = 15; //bleue const int LED_Verte = 18; // verte const int LED_Rouge = 19; // rouge AsyncWebServer server(80); const char *ssid ="ON_AIR2022"; const char *password ="c............................................................v4"; // Json Variable to Hold Sensor Readings JSONVar readings; // Timer variables unsigned long lastTime = 0; unsigned long timerDelay = 60000; //10sec->630sec int i,j,k; int status = WL_IDLE_STATUS; char BMPOK=0; char Presschar [10]; byte mcp_PA=0; byte mcp_PB=0; unsigned int mcp_PAB=0; char MCP_Readchar[10]; byte addr[8]; byte type_s; float temperatureC; unsigned int Cpt=0; // 22-06 float p = 0.0; // BMP085 Pression float t = 0.0 ; // AM2302 temper float h = 0.0 ; // AM2302 Humid #define DHTTYPE DHT22 ; // DHT type (DHT11, DHT22) int DHTPIN = 5 ; // GPIO 5 <-- Broche du capteur AM2302 char Tempchar [10]; char Humidchar[10]; byte nDevices = 0; byte error=0; byte address=0; #define SCL 22 //ESP32 SCL I2C fil jaune --> SCL BMP085 #define SDA 21 //ESP32 SDA I2C fil vert --> SDA BMP085 // Création des objets const int oneWireBus = 4; // GPIO DS18B20 OneWire ds(oneWireBus);// Setup a oneWire instance to communicate with OneWire devices (DS18B20) DallasTemperature sensors(&ds);// Pass our oneWire reference to Dallas Temperature sensor Adafruit_BMP085 bmp; // connect to ESP32 I2C (GPIO 21 = SDA, GPIO 22 = SCL) DHTesp dht; // AM2302 DHT12 // Address OWS DS18B20 repérée #3 (CRC= 0x40 ) DeviceAddress sensor1 = { 0x28,0xFF, 0xAA, 0x56, 0xC1, 0x38, 0x14, 0x01}; IPAddress ip(192, 168,0,109); IPAddress dns(192, 168, 43, 1); IPAddress gateway(192, 168, 43, 1); IPAddress subnet(255, 255, 255, 0); String json; void check_if_exist_I2C() { nDevices = 0; Serial.println(" "); for (address = 1; address < 127; address++ ) { // The i2c_scanner uses the return value of // the Write.endTransmisstion to see if // a device did acknowledge to the address. Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { Serial.print("I2C device found at address 0x"); if (address < 16) Serial.print("0"); Serial.print(address, HEX); switch (address) { case 0x20: Serial.println(" MCP23017 2x8 Bits I/O"); // de base + 7 autres break; case 0x27: case 0x28: case 0x29: case 0x2A: // case etc .. Serial.println(" PCF8574 8bits I/O"); // de base + 7 autres break; case 0x37: Serial.println(" LCD 2119 2x16cars"); // de base + 7 autres break; case 0x38: case 0x39: case 0x3A: case 0x3B: // case etc .. Serial.println(" PCF8574A 8bits I/O"); // de base + 7 autres break; case 0x3C: Serial.println( " OLED SSD1306"); break; case 0x53: Serial.println(" ADXL345 board"); break; case 0x57: Serial.println(" EEPROM 512bytes"); break; case 0x68: Serial.println(" RTC DS3231"); break; case 0x77: Serial.println(" BMP 085 Pression"); break; default: Serial.println(" non reconnue"); break; } //switch nDevices++; } delay(10); } //for loop if (nDevices == 0) Serial.println("No I2C devices found"); else Serial.printf("Trouve %3d devices sur le Bus I2C\r\n",nDevices); delay(200); } String getSensorReadings(){ readings["Cpt"] = String(Cpt); sensors.requestTemperatures(); temperatureC = sensors.getTempCByIndex(0); readings["DS18B20"] = String(temperatureC); p = bmp.readPressure() / 100.0F; //mBar ou hPa readings["Pression"] = String(p); // t = dht.getTemperature(); readings["Temperature"] = String(t); h=dht.getHumidity(); readings["Humidity"] = String(h); #ifdef With_MCP readings["MCP23017"] = String(mcp_PB); #endif String jsonString = JSON.stringify(readings); Serial.println(jsonString); return jsonString; } void get_network_info(){ if(WiFi.status() == WL_CONNECTED) { Serial.print("[*] Network information for "); Serial.println(ssid); Serial.println("[+] BSSID : " + WiFi.BSSIDstr()); Serial.print("[+] Gateway IP : "); Serial.println(WiFi.gatewayIP()); Serial.print("[+] Subnet Mask : "); Serial.println(WiFi.subnetMask()); Serial.println((String)"[+] RSSI : " + WiFi.RSSI() + " dB"); Serial.print("[+] ESP32 IP : "); Serial.println(WiFi.localIP()); } } String get_wifi_status(int status){ switch(status) { case WL_IDLE_STATUS: return "WL_IDLE_STATUS"; case WL_SCAN_COMPLETED: return "WL_SCAN_COMPLETED"; case WL_NO_SSID_AVAIL: return "WL_NO_SSID_AVAIL"; case WL_CONNECT_FAILED: return "WL_CONNECT_FAILED"; case WL_CONNECTION_LOST: return "WL_CONNECTION_LOST"; case WL_CONNECTED: return "WL_CONNECTED"; case WL_DISCONNECTED: return "WL_DISCONNECTED"; } } void recvMsg(uint8_t *data, size_t len){ WebSerial.println("Reception ..."); String St = ""; for(int i=0; i < len; i++){ St += char(data[i]); } WebSerial.println(St); if(St== "I_ON") digitalWrite(LED_I, HIGH); if(St== "I_OFF") digitalWrite(LED_I, LOW); if(St== "R_ON" ) digitalWrite(LED_Rouge, HIGH); if(St== "R_OFF") digitalWrite(LED_Rouge, LOW); if(St== "V_ON" ) digitalWrite(LED_Verte, HIGH); if(St== "V_OFF") digitalWrite(LED_Verte, LOW); if(St== "B_ON" ) digitalWrite(LED_Bleue, HIGH); if(St== "B_OFF") digitalWrite(LED_Bleue, LOW); } void OneWireScanner(){ if ( !ds.search(addr)) { Serial.println(" No more addresses."); Serial.println(); ds.reset_search(); return; } Serial.print(" ROM = "); for( i = 0; i < 8; i++) { Serial.write(' '); Serial.print("0x"); if (addr[i] < 0x10) Serial.write('0'); Serial.print(addr[i], HEX); if ( i != 7 ) { Serial.print(", "); } } if (OneWire::crc8(addr, 7) != addr[7]) { Serial.println("CRC is not valid!"); return; } Serial.println(); // the first ROM byte indicates which chip switch (addr[0]) { case 0x10: Serial.println(" Chip = DS18S20"); // or old DS1820 type_s = 1; break; case 0x28: Serial.println(" Chip = DS18B20"); type_s = 0; break; case 0x22: Serial.println(" Chip = DS1822"); type_s = 0; break; default: Serial.println(" Device is not a DS18x20 family device."); return; } Serial.println(); } // Initialize WiFi void initWiFi() { int status =WL_IDLE_STATUS; WiFi.mode(WIFI_STA); delay(1000); while (WiFi.status() != WL_CONNECTED) { WiFi.disconnect(); //23-11-2022 Serial.println("\nConnecting"); WiFi.begin(ssid, password); delay(2000); Serial.print("Connecting to WiFi .."); //Serial.println(get_wifi_status(status)); Serial.print("."); delay(3000); } Serial.println(); } void setup() { Serial.begin(115200); pinMode( LED_I,OUTPUT); // 2 bleue sur ESP32 pinMode( LED_Bleue,OUTPUT); // 15 bleue pinMode( LED_Verte,OUTPUT); // 18 verte pinMode( LED_Rouge,OUTPUT); // 19 rouge for (i=0;i<4;i++) { digitalWrite(LED_I, HIGH); delay(500); digitalWrite(LED_I, LOW); delay(500); } Serial.print(" Web serial Application , rev :"); Serial.println(Version); Serial.print(" avec carte : ESP32 Bleu : Doit ESP32 DevKit V1\r\n"); Serial.println(" ESP32 Vroom 32 DevkitV1 (Rouge sur COM 56) ou (Bleu sur COM 57)"); Serial.println(" Chip is ESP32-D0WDQ6 (rev1),Crystal:40MHz, MAC: 08:3a:f2:8d:c9:94"); Serial.println(" Led Rouge sur D19 ,Led Verte sur D18 ,Led Bleue sur D15 Led inbuilt sur D2"); Serial.println(" DHT11-AM2302 sur D5 (à déconnecter pour Upload !)"); Serial.println(" Sonde temper.OWS DS18B20 AA56C13 81401 sur D4 "); Serial.println(" I2C Bus sur D21 (SDA) et D22 (SCL) "); Serial.println(" WebSerial is accessible at /webserial in browser"); Serial.println(" Recherche devices presents sur le bus I2C SCL=22 SDA=21"); Wire.begin(SDA,SCL); // pin on ESP32 check_if_exist_I2C(); Serial.println("\r\n .. Fin de test I2C bus \r\n"); Serial.println(" Sensors begin\r\n"); sensors.begin(); //---- Pressure sensor BMP085 ---------------- // Initialisation if ( !bmp.begin() ) { Serial.println(" BMP085 BAD!"); delay(1000); BMPOK=0; p=999.99; } else { Serial.print(" BMP085 OK "); BMPOK=1; p = bmp.readPressure() / 100.0F; Serial.printf(" Press.% 5.0f mBar \r\n",p); } //----------------------------------- Serial.println(" Scan devices on OWS BUS "); for (i=0;i<3;i++) { Serial.printf(" i= %5d \r\n",i); OneWireScanner(); Serial.println(); delay(1000); } sensors.requestTemperatures(); delay(1000); temperatureC = sensors.getTempCByIndex(0); if (temperatureC < -10.0) temperatureC= -10.0; Serial.printf(" DS18B20 =% 3.2f\r\n",temperatureC); //----- DHT11 AM2302 Sensor ---------------- dht.setup(DHTPIN,DHTesp::DHT22); delay(1500); t = dht.getTemperature(); if (isnan(t)) snprintf(Tempchar,6,"%s\t"," ???"); else snprintf(Tempchar,6,"%3.2f\t",t); //------------------- h=dht.getHumidity(); if (isnan(h)) snprintf(Humidchar,6,"%s\t"," ???"); else snprintf(Humidchar,6,"%2.2f\t",h); Serial.print(F(" DHT11 Temp.: ")); Serial.println(Tempchar); Serial.print(F(" Humid : ")); Serial.println(Humidchar); Serial.printf(" Compteur=%5d\r\n",Cpt); Serial.println("init Wifi"); initWiFi(); delay(1000); Serial.println("Wifi init OK\r\n"); // WiFi.mode(WIFI_STA); // WiFi.begin(ssid, password); // if (WiFi.waitForConnectResult() != WL_CONNECTED) // { // Serial.printf("WiFi Failed!\n"); // return; // } // Serial.print("IP Address: "); // Serial.println(WiFi.localIP()); WebSerial.begin(&server); WebSerial.msgCallback(recvMsg); server.begin(); } void loop() { json=getSensorReadings(); WebSerial.println(json); /* Serial.printf(" Cpt= %5d ",Cpt); if (BMPOK==1) { p = bmp.readPressure() / 100.0F; } else //2 { p=999.99; } Serial.printf(", BMP085 P.% 5.0f mBar ",p); h=dht.getHumidity(); if (isnan(h)) snprintf(Humidchar,6,"%s\t"," ???"); else snprintf(Humidchar,6,"%2.2f\t",h); Serial.print(F(", Humid: ")); Serial.print(Humidchar); t = dht.getTemperature(); if (isnan(t)) snprintf(Tempchar,6,"%s\t"," ???"); else snprintf(Tempchar,6,"%3.2f\t",t); Serial.print(F(",Temp: ")); Serial.print(Tempchar); sensors.requestTemperatures(); temperatureC = sensors.getTempCByIndex(0); if (temperatureC < -10.0) temperatureC= -10.0; Serial.printf(",DS18B20.0 =% 3.2f °C ",temperatureC); */ Cpt=Cpt+1.0; if (Cpt>9999) Cpt=0; delay(2000); } /* ets Jun 8 2016 00:22:57 rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:1284 load:0x40078000,len:12836 load:0x40080400,len:3032 entry 0x400805e4 Web serial Application , rev :03/12/2022 avec carte : ESP32 Bleu : Doit ESP32 DevKit V1 ESP32 Vroom 32 DevkitV1 (Rouge sur COM 56) ou (Bleu sur COM 57) Led Rouge sur D5 DHT11-AM2302 sur D2 (à déconnecter pour Upload !) Sonde temper.OWS DS18B20 AA56C13 81401 sur D4 I2C Bus sur D21 (SDA) et D22 (SCL) WebSerial is accessible at /webserial in browser Recherche devices presents sur le bus I2C SCL=22 SDA=21 I2C device found at address 0x3C OLED SSD1306 I2C device found at address 0x77 BMP 085 Pression Trouve 2 devices sur le Bus I2C .. Fin de test I2C bus Sensors begin BMP085 OK Press. 984 mBar Scan devices on OWS BUS i= 0 ROM = 0x28, 0xAA, 0x56, 0xC1, 0x38, 0x14, 0x01, 0x40 Chip = DS18B20 DS18B20 = 17.00 DHT11 Temp.: ??? Humid : ??? Compteur= 0 init Wifi **** Problemo avec YAT terminal ..qui ne montre plus rien ... C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Paul\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Paul\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Paul\Documents\Arduino\libraries -fqbn=esp32:esp32:esp32doit-devkit-v1:FlashFreq=80,UploadSpeed=921600, DebugLevel=none -vid-pid=1A86_55D4 -ide-version=10819 -build-path C:\Users\Paul\AppData\Local\Temp\arduino_build_972824 -warnings=default -build-cache C:\Users\Paul\AppData\Local\Temp\arduino_cache_100107 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mklittlefs.path=C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\mklittlefs\3.0.0-gnu12-dc7f933 -prefs=runtime.tools.mklittlefs-3.0.0-gnu12-dc7f933.path=C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\mklittlefs\3.0.0 -gnu12-dc7f933 -prefs=runtime.tools.esptool_py.path=C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.1.0 -prefs=runtime.tools.esptool_py-3.1.0.path=C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.1.0 -prefs=runtime.tools.riscv32-esp-elf-gcc.path =C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.riscv32-esp-elf-gcc-gcc8_4_0-esp-2021r2.path= C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc.path= C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2 .... Using board 'esp32doit-devkit-v1' from platform in folder: C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.1 Using core 'esp32' from platform in folder: C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.1 cmd /c if exist "D:\\_ESP32_2022\\_ESP32_Web_Serial_2022-12\\partitions.csv" COPY /y "D:\\_ESP32_2022\\_ESP32_Web_Serial_2022-12\\partitions.csv" " C:\\Users\\Paul\\AppData\\Local\\Temp\\arduino_build_972824\\partitions.csv" .......... Alternatives for Wire.h: [Wire@2.0.0] ResolveLibrary(Wire.h) -> candidates: [Wire@2.0.0] "C:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc \\gcc8_4_0-esp-2021r2/bin/xtensa-esp32-elf-g++" -DHAVE_CONFIG_H "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -D_GNU_SOURCE "-DIDF_VER=\"v4.4-dev-3569-g6a7d83af19-dirty\"" -DESP_PLATFORM "-IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/config" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/newlib/platform_include" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/freertos/include" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/freertos/include/ esp_additions/freertos" "-IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/ freertos/port/xtensa/include" "-IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/ include/freertos/include/esp_additions" "-IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/ sdk/esp32/include/esp_hw_support/include" "-IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/ tools/sdk/esp32/include/esp_hw_support/include/soc" "-IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\ esp32\\2.0.1/tools/sdk/esp32/include/esp_hw_support/include/soc/esp32" "-IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32 \\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/esp_hw_support/port/esp32" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/heap/include" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/log/include" " ....etc -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/hal/esp32/include" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/hal/include" " ..... -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/esp_wifi/include" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/esp_event/include" " ....... -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/wpa_supplicant/include" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/wpa_supplicant/port/include" " ..... Alternatives for Adafruit_Sensor.h: [Adafruit_Unified_Sensor@1.1.5] ResolveLibrary(Adafruit_Sensor.h) -> candidates: [Adafruit_Unified_Sensor@1.1.5] .... -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/newlib/platform_include" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1/tools/sdk/esp32/include/freertos/include" " .......... -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1\\libraries\\FS\\src" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1\\libraries\\WiFi\\src" " -IC:\\Users\\Paul\\Documents\\Arduino\\libraries\\WebSerial\\src" " -IC:\\Users\\Paul\\Documents\\Arduino\\libraries\\DHT_sensor_library_for_ESPx" " -IC:\\Users\\Paul\\Documents\\Arduino\\libraries\\Adafruit_BMP085_Library" " -IC:\\Users\\Paul\\Documents\\Arduino\\libraries\\Adafruit_BusIO" " -IC:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\2.0.1\\libraries\\Wire\\src" " -IC:\\Users\\Paul\\Documents\\Arduino\\libraries\\Adafruit_Unified_Sensor" " -IC:\\Users\\Paul\\Documents\\Arduino\\libraries\\Arduino_JSON\\src" " .... Alternatives for DallasTemperature.h: [DallasTemperature@3.8.0] ResolveLibrary(DallasTemperature.h) -> candidates: [DallasTemperature@3.8.0] ...... Alternatives for SPI.h: [SPI@2.0.0] ResolveLibrary(SPI.h) -> candidates: [SPI@2.0.0] Using cached library dependencies for file: C:\Users\Paul\Documents\Arduino\libraries\Adafruit_BusIO\Adafruit_I2CDevice.cpp .... ..... Using library SPI at version 2.0.0 in folder: C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.1\libraries\SPI "C:\\Users\\Paul\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp32-elf-gcc\\ gcc8_4_0-esp-2021r2/bin/xtensa-esp32-elf-size" -A "C:\\Users\\Paul\\AppData\\Local\\Temp\\arduino_build_972824/_ESP32_Web_Serial_2022-12.ino.elf" Sketch uses 823173 bytes (62%) of program storage space. Maximum is 1310720 bytes. Global variables use 39128 bytes (11%) of dynamic memory, leaving 288552 bytes for local variables. Maximum is 327680 bytes. C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\3.1.0 /esptool.exe --chip esp32 --port COM57 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0xe000 C:\Users\Paul\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.1/tools/partitions/boot_app0.bin 0x1000 C:\Users\Paul\AppData\Local\Temp\arduino_build_972824/_ESP32_Web_Serial_2022-12.ino.bootloader.bin 0x10000 C:\Users\Paul\AppData\Local\Temp\arduino_build_972824/_ESP32_Web_Serial_2022-12.ino.bin 0x8000 C:\Users\Paul\AppData\Local\Temp\arduino_build_972824/_ESP32_Web_Serial_2022-12.ino.partitions.bin esptool.py v3.1 Serial port COM57 Connecting.... Chip is ESP32-D0WDQ6 (revision 1) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 08:3a:f2:8d:c9:94 Uploading stub... Running stub... Stub running... Changing baud rate to 921600 Changed. Configuring flash size... Flash will be erased from 0x0000e000 to 0x0000ffff... Flash will be erased from 0x00001000 to 0x00005fff... Flash will be erased from 0x00010000 to 0x000dafff... Flash will be erased from 0x00008000 to 0x00008fff... Compressed 8192 bytes to 47... Writing at 0x0000e000... (100 %) Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 652.6 kbit/s)... Hash of data verified. Compressed 17248 bytes to 11870... Writing at 0x00001000... (100 %) Wrote 17248 bytes (11870 compressed) at 0x00001000 in 0.5 seconds (effective 270.6 kbit/s)... Hash of data verified. Compressed 828944 bytes to 545030... Writing at 0x00010000... (2 %) Writing at 0x00014557... (5 %) Writing at 0x00018525... (8 %) Writing at 0x0001c5d9... (11 %) Writing at 0x00022b88... (14 %) Writing at 0x0002dbf2... (17 %) Writing at 0x0003f67a... (20 %) Writing at 0x00045875... (23 %) Writing at 0x0004b9ed... (26 %) Writing at 0x000511a6... (29 %) Writing at 0x00056957... (32 %) Writing at 0x0005c014... (35 %) Writing at 0x0006147d... (38 %) Writing at 0x00066633... (41 %) Writing at 0x0006bab8... (44 %) Writing at 0x00070ca5... (47 %) Writing at 0x00075ec3... (50 %) Writing at 0x0007af6b... (52 %) Writing at 0x00080907... (55 %) Writing at 0x00085af4... (58 %) Writing at 0x0008aebb... (61 %) Writing at 0x0008ffc7... (64 %) Writing at 0x00095757... (67 %) Writing at 0x0009af68... (70 %) Writing at 0x000a0bcd... (73 %) Writing at 0x000a669b... (76 %) Writing at 0x000abbc3... (79 %) Writing at 0x000b4a68... (82 %) Writing at 0x000bd072... (85 %) Writing at 0x000c2951... (88 %) Writing at 0x000c86e5... (91 %) Writing at 0x000cde80... (94 %) Writing at 0x000d33cd... (97 %) Writing at 0x000d8c80... (100 %) Wrote 828944 bytes (545030 compressed) at 0x00010000 in 8.7 seconds (effective 764.9 kbit/s)... Hash of data verified. Compressed 3072 bytes to 128... Writing at 0x00008000... (100 %) Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 274.3 kbit/s)... Hash of data verified. Leaving... Hard resetting via RTS pin... */