je ne comprends pas pouvez vous m'aidez mon code est tout petit
`
#include "BluetoothSerial.h"
#include "esp_bt_main.h"
#include "esp_bt_device.h"
#include <WiFi.h>
String Data;
#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 printDeviceAddress() {
const uint8_t* point = esp_bt_dev_get_address();
for (int i = 0; i < 6; i++) {
char str[3];
sprintf(str, "%02X", (int)point[i]);
Serial.print(str);
if (i < 5){
Serial.print(":");}
}
Serial.println();
}
IPAddress staticIP428_20(192,168,1,20);
IPAddress gateway428_20(192,168,1,1);
IPAddress subnet428_20(255,255,255,0);
WiFiClient client;
String myurl = "/";
void close_door() {
myurl += "close";
client.print(String("GET ") + myurl + " HTTP/1.1\r\n" +
"Host: " + "192.168.1.10" + "\r\n" +
"Connection: close\r\n\r\n");
myurl="/";
}
void GO_TO() {
}
void setup()
{
Data = "";
Serial.begin(9600);
pinMode(22, OUTPUT);
pinMode(21, OUTPUT);
Serial.println("start");
SerialBT.begin("Friends Loop");
printDeviceAddress();
WiFi.begin("Friends LOOP","123456789");
WiFi.config(staticIP428_20, gateway428_20, subnet428_20);
}
void loop()
{
if (SerialBT.available()) {
client.connect("192.168.1.10", 80);
Data = (SerialBT.readString());
Serial.println(Data);
if (Data == "gare") {
GO_TO();
} else if (Data == "gelos") {
GO_TO();
} else if (Data == "close") {
close_door();
} else {
digitalWrite(22,LOW);
digitalWrite(21,LOW);
}
}
}`
error code
`Le croquis utilise 1677237 octets (127%) de l'espace de stockage de programmes. Le maximum est de 1310720 octets.
Les variables globales utilisent 59468 octets (18%) de mémoire dynamique, ce qui laisse 268212 octets pour les variables locales. Le maximum est de 327680 octets.
Croquis trop gros; vois https://support.arduino.cc/hc/en-us/articles/360013825179 pour des conseils de réduction.
text section exceeds available space in board
Compilation error: text section exceeds available space in board`