I have problem receiving RGB from web i have problem
</>
#include <WiFi.h>
#include <ESPAsyncWebServer.h>
#include <Wire.h>
#include <RtcDS3231.h> // Include RTC library by Makuna: GitHub - Makuna/Rtc: Arduino Library for RTC, Ds1302, Ds1307, Ds3231, & Ds3234 with deep support. Please refer to the Wiki for more details. Please use the Github Discussions to ask questions as the GitHub Issues feature is used for bug tracking.
#include <AsyncTCP.h>
#include <SPIFFS.h>
#include <FastLED.h>
#include <FS.h>
const char* ssid = "SMART";
const char* password = "11111111";
const int redPin = 12;
const int greenPin = 13;
const int bluePin = 14;
AsyncWebServer server(80);
void setup() {
Serial.begin(115200);
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
Serial.println(WiFi.localIP());
server.on("/color", HTTP_POST, [](AsyncWebServerRequest *request){
String red = request->getParam("r")->value();
String green = request->getParam("g")->value();
String blue = request->getParam("b")->value();
int redValue = red.toInt();
int greenValue = green.toInt();
int blueValue = blue.toInt();
setColor(redValue, greenValue, blueValue);
request->send(204, "text/plain", "Color updated");
});
server.serveStatic("/", SPIFFS, "/").setDefaultFile("index.html");
if (SPIFFS.begin(true)) {
Serial.println("SPIFFS mounted successfully");
} else {
Serial.println("SPIFFS mounting failed");
}
server.begin();
}
void loop() {
}
void setColor(int red, int green, int blue) {
}</>
</>
LED Controller