Bonjour a tous, sur le logiciel, je compile un tout petit programme, il me note, je comprend pas, il n’y a pas erreur sur mon program main.cpp
#include <Arduino.h>
#include <WebServer.h>
#include <WiFi.h>
#include "BluetoothSerial.h"
// put function declarations here:
int myFunction(int, int);
// WIFI
const char\* ssid = "ma-box";
const char\* password = "mot_de_passe";
WebServer server(80);
String htmlPage() {
String ip = WiFi.localIP().toString();
String html;
html = "<!doctype html>";
html += "";
html += "";
html += "ESP32-C3 opérationnel";
html += "";
html += "html,body{height:100%;margin:0}";
html +=
"body{display:flex;align-items:center;justify-content:center;background:"
"linear-gradient(135deg,#f7fafc,#edf2f7)}";
html +=
".card{font-family:system-ui,-apple-system,Segoe "
"UI,Roboto,Ubuntu,Cantarell,‘Noto Sans’,‘Helvetica "
"Neue’,Arial,sans-serif;";
html +=
"background:#fff;padding:28px 26px;border-radius:16px;box-shadow:0 10px "
"25px rgba(0,0,0,.08);text-align:center;max-width:560px}";
html += "h1{margin:0 0 10px 0;font-size:1.6rem;line-height:1.3}";
html += "p{margin:.4rem 0;color:#4a5568}";
html +=
".pill{display:inline-block;margin-top:10px;padding:6px "
"10px;border-radius:999px;background:#f1f5f9;color:#334155;font-size:."
"9rem}";
html + @keyframe @keyframes ".blink{animation:b 1.2s ease-in-out infinite}";
html += "@keyframes b{0%,100%{opacity:1}50%{opacity:.35}}";
html += "";
html += "";
html += "👋 Bonjour, moi c’est l’ESP32‑C3 ";
html += "ESP32‑C3 opérationnel ✓";
html += "Adresse IP : **" + ip + "**";
html += "Ouvre cette URL depuis ton réseau local : `http://" + ip + "/`";
html += "";
return html;
}
void handleRoot() {
// important: préciser le charset pour les accents
server.send(200, "text/html; charset=utf-8", htmlPage());
}
// Blutooth
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run \`make menuconfig\` to and enable it
#endif
BluetoothSerial SerialBT;
void setup() {
// WIFI + BLUETOOTH
// Bluetooth
Serial.begin(115200);
SerialBT.begin("ESP32_GG"); // Bluetooth device name
Serial.println("Service demaré, connecté bluetooth!");
// WIFI
Serial.begin(115200);
delay(800);
Serial.println("\\n=== ESP32-C3 – Page web jolie (UTF-8) ===");
WiFi.mode(WIFI_STA);
WiFi.setSleep(false);
Serial.printf("Connexion au Wi-Fi \\" % s\\"…\\n", ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(300);
Serial.print(‘.’);
}
Serial.println();
Serial.println("✅ Wi-Fi connecté");
Serial.print("➡️ Adresse IP : ");
Serial.println(WiFi.localIP());
server.on("/", handleRoot);
server.begin();
Serial.println(
"🌍 Serveur HTTP démarré — ouvre l’IP ci-dessus dans ton navigateur.");
// put your setup code here, to run once:
int result = myFunction(2, 3);
}
void loop() {
// put your main code here, to run repeatedly:
server.handleClient();
} // put function definitions here:
int myFunction(int x, int y) { return x + y; }
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [== ] 17.9% (used 58812 bytes from 327680 bytes)
Error: The program size (1554337 bytes) is greater than maximum allowed (1310720 bytes)
Flash: [=====*** [checkprogsize] Explicit exit, status 1
=====] 118.6% (used 1554337 bytes from 1310720 bytes)
================================================ \[FAILED\] Took 6.96 seconds =======