Hey everyone ! Im new to PlatformIO and I want a bit of guidance . I have searched the internet and read a lot of posts here aswell , about SPIFFS/LittleFS, but cant seem to manage to make my program work .
Code :
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
AsyncWebServer server(80);
const char *ssid = "";
const char *password = "";
void setup()
{
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.begin(9600);
delay(100);
if (WiFi.waitForConnectResult() != WL_CONNECTED)
{
Serial.printf("WiFi Failed!\n");
return;
}
Serial.print("IP Address: ");
Serial.println(WiFi.localIP());
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
request->send(200, "text/html", "/index.html");
});
server.begin();
}
So im trying to build a web server which will take data from an Arduino UNO . I want all my web stuff ( html, css , js etc ) to be in a separate folder so I can have my project more clean .
Also, im not 100% sure that I’ve chose the right board ( I have a nodeMCU esp8266 )
PlatformIO.ini :
platform = espressif8266
board = esp12e
framework = arduino