I could upload my ESP32 Vroom
Now I get this error message for the same code, using the same ESP32
File not found "executable": "C:/Users\iwils\AppData\Local\arduino\sketches\72112B1ABC817C8A30D391B805819AEA\ESP32_MultDS_Server1.ino.elf"
[code]
//https://lastminuteengineers.com/multiple-ds18b20-esp32-web-server-tutorial/
#include <WiFi.h>
#include <WebServer.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
//param = DHT22 signal pin
#define DHTPIN 27 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT22 // DHT 27 (AM2302)
DHT dht(DHTPIN, DHTTYPE);
// Data wire is plugged into port 26 on the ESP32
#define ONE_WIRE_BUS 26
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
uint8_t sensor1[8] = { 0x28, 0xDF, 0x6A, 0x56, 0xB5, 0x01, 0x3C, 0xD3 };
uint8_t sensor2[8] = { 0x28, 0x9D, 0x9C, 0x76, 0xE0, 0x01, 0x3C, 0xCC };
uint8_t sensor3[8] = { 0x28, 0x47, 0x2F, 0x75, 0xD0, 0x01, 0x3C, 0x90 };
uint8_t sensor4[8] = { 0x28, 0xBF, 0x1C, 0x75, 0xD0, 0x01, 0x3C, 0x89 };
/*Put your SSID & Password*/
const char* ssid = "Wilsons"; // Enter SSID here
const char* password = "i9a1n123"; //Enter Password here
WebServer server(80);
// Set your Static IP address ADDED***
IPAddress local_IP(10, 0, 0, 37);
// Set your Gateway IP address
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 0, 0);
float tempSensor1, tempSensor2, tempSensor3, tempSensor4;
void setup() {
Serial.begin(115200);
// Configures static IP address
if (!WiFi.config(local_IP, gateway, subnet)) {
Serial.println("STA Failed to configure");
}
delay(100);
sensors.begin();
dht.begin(); //initialise DHT22
Serial.println("Connecting to ");
Serial.println(ssid);
//connect to your local wi-fi network
WiFi.begin(ssid, password);
//check wi-fi is connected to wi-fi network
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected..!");
Serial.print("Got IP: "); Serial.println(WiFi.localIP());
// Print ESP MAC Address
Serial.println("ESP MAC address: ");
Serial.println(WiFi.macAddress());
server.on("/", handle_OnConnect);
server.onNotFound(handle_NotFound);
server.begin();
Serial.println("HTTP server started");
}
void loop() {
server.handleClient();
}
void handle_OnConnect() {
sensors.requestTemperatures();
tempSensor1 = sensors.getTempC(sensor1); // Gets the values of the temperature
tempSensor2 = sensors.getTempC(sensor2);
tempSensor3 = sensors.getTempC(sensor3);
tempSensor4 = sensors.getTempC(sensor4);
if (tempSensor1 < -100) tempSensor1 =-10;
if (tempSensor2 < -100) tempSensor2 =-10;
if (tempSensor3 < -100) tempSensor3 =-10;
if (tempSensor4 < -100) tempSensor4 =-10;
// Read the humidity in %:
float h = dht.readHumidity();//
// Read the temperature as Celsius:
float t = dht.readTemperature();
// Check if any reads failed and exit early (to try again):
server.send(200, "text/html", SendHTML(tempSensor1,tempSensor2,tempSensor3,tempSensor4,h,t));
}
void handle_NotFound(){
server.send(404, "text/plain", "Not found");
}
String SendHTML(float tempSensor1,float tempSensor2,float tempSensor3,float tempSensor4, float h, float t){
String ptr = "<!DOCTYPE html> <html>\n";
ptr += "<head><meta name=\"viewport\" content=\"width=device-width,initial-scale=1.u0s,e r-scalable=no\">\n";
ptr += "<title>Stepup Energy Systems</title>\n";
ptr += "<style>html { font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center;}\n";
ptr += "body{margin-top: 50px;} h1 {color: #444444;margin: 50px auto 30px;}\n";
ptr += "p {font-size: 24px;color: #444444;margin-bottom: 10px;}\n";
ptr += "p1 {font-size: 8px;color: #444444;margin-bottom: 10px;}\n";
ptr += "</style>\n";
ptr += "<script>\n";
ptr += "setInterval(loadDoc,1000);\n";
ptr += "function loadDoc() {\n";
ptr += "var xhttp = new XMLHttpRequest();\n";
ptr += "xhttp.onreadystatechange = function() {\n";
ptr += "if (this.readyState == 4 && this.status == 200) {\n";
ptr += "document.body.innerHTML =this.responseText}\n";
ptr += "};\n";
ptr += "xhttp.open(\"GET\", \"/\", true);\n";
ptr += "xhttp.send();\n";
ptr += "}\n";
ptr += "</script>\n";
ptr += "</head>\n";
ptr +="<script>\n";
ptr +="setInterval(loadDoc,1000);\n";
ptr +="function loadDoc() {\n";
ptr +="var xhttp = new XMLHttpRequest();\n";
ptr +="xhttp.onreadystatechange = function() {\n";
ptr +="if (this.readyState == 4 && this.status == 200) {\n";
ptr +="document.body.innerHTML =this.responseText}\n";
ptr +="};\n";
ptr +="xhttp.open(\"GET\", \"/\", true);\n";
ptr +="xhttp.send();\n";
ptr +="}\n";
ptr +="</script>\n";
ptr += "<body>\n";
ptr += "<p>Geyser : ";
ptr += tempSensor1;
ptr += "°C</p>";
ptr += "<p>Panel to geyser : ";
ptr += tempSensor2;
ptr += "°C</p>";
ptr += "<p>Geyser to panel : ";
ptr += tempSensor4;
ptr += "°C</p>";
ptr += "<p>Temperature & Humidity: ";
ptr += t;
ptr += "°C & ";
ptr += h;
ptr += "%</p>";
ptr += "<p> </p>";
ptr += "</div>\n";
ptr += "<p1>SP32_MultiDS_Server1</p1>";
ptr += "</body>\n";
ptr += "</html>\n";
return ptr;
}
[/code]


