Hello,
I tried rebuilding the intelliSense index, and it seems like everything is uploading, however, when trying to connect to my ESP32 and going to the local ip address it doesn’t seem to have the index.html page for me.
This is the message I get when building and uploading.
Processing adafruit_feather_esp32s3_tft (platform: espressif32; board: adafruit_feather_esp32s3_tft; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/adafruit_feather_esp32s3_tft.html
PLATFORM: Espressif 32 (6.2.0) > Adafruit Feather ESP32-S3 TFT
HARDWARE: ESP32S3 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20008.0 (2.0.8)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
- toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Warning! An extra UF2 bootloader image is already added!
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep, Compatibility ~ soft
Found 49 compatible libraries
Scanning dependencies...
Dependency Graph
|-- STM32duino VL53L4CD @ 1.0.2
|-- GFX Library for Arduino @ 1.3.5
|-- Adafruit ST7735 and ST7789 Library @ 1.10.0
|-- ESPAsyncWebServer-esphome @ 3.0.0
|-- Adafruit GFX Library @ 1.11.5
|-- LittleFS @ 2.0.0
|-- SPI @ 2.0.0
|-- WiFi @ 2.0.0
|-- Wire @ 2.0.0
Building in release mode
Building FS image from 'data' directory to .pio\build\adafruit_feather_esp32s3_tft\littlefs.bin
/.Rhistory
/index.html
/script.js
/style.css
Looking for upload port...
Auto-detected: COM10
Forcing reset using 1200bps open/close on port COM10
Waiting for the new upload port...
Uploading .pio\build\adafruit_feather_esp32s3_tft\littlefs.bin
esptool.py v4.5.1
Serial port COM9
Connecting...
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: f4:12:fa:59:a9:e0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00310000 to 0x003fffff...
Compressed 983040 bytes to 2791...
Writing at 0x00310000... (100 %)
Wrote 983040 bytes (2791 compressed) at 0x00310000 in 8.4 seconds (effective 937.4 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
========================================================================================= [SUCCESS] Took 15.52 seconds =========================================================================================
This is what’s contained in my platform.ini
[env:adafruit_feather_esp32s3_tft]
platform = espressif32
board = adafruit_feather_esp32s3_tft
framework = arduino
lib_deps = `Preformatted text`
stm32duino/STM32duino VL53L4CD@^1.0.2
moononournation/GFX Library for Arduino@^1.3.5
adafruit/Adafruit ST7735 and ST7789 Library@^1.10.0
ottowinter/ESPAsyncWebServer-esphome@^3.0.0
monitor_speed = 115200
board_build.filesystem = littlefs
lib_ldf_mode=deep
Is it possible that the problem is the setup not calling the littlefs file system correctly?
// Replaces placeholder with sensor values
String processor(const String& var){
//Serial.println(var);
getSensor1Reading(status1, NewDataReady1);
if(var == "DISTANCE"){
return String(sensor1);
}
else if(var =="OFFSET"){
return String(offset);
}
return String();
getSensor2Reading(status2, NewDataReady2);
if(var == "DISTANCE"){
return String(sensor2);
}
else if(var =="OFFSET"){
return String(offset);
}
return String();
}
/* Setup ---------------------------------------------------------------------*/
void setup()
{
// Initialize serial for output.
SerialPort.begin(115200);
SerialPort.println("Starting...");
initLittleFS();
initWifi();
// Route for root / web page
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(LittleFS, "/index.html", String(), false, processor);
});
// Route to load style.css file, and script.js file
server.serveStatic("/", LittleFS, "/");
server.on("/distance", HTTP_GET, [](AsyncWebServerRequest *request){
getSensor1Reading(status1, NewDataReady1);
request->send_P(200, "text/plain", String(sensor2).c_str());
});
server.on("/offset", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/plain", String(offset).c_str());
});
server.on("/zero", HTTP_GET, [] (AsyncWebServerRequest *request){
zero(sensor1);
Serial.println("Sensor Zeroed");
});
server.on("/reset", HTTP_GET, [] (AsyncWebServerRequest *request){
offset = 0;
Serial.println("Offset Reset");
});
server.begin();
// Initialize I2C bus.
DEV_I2C.begin();
initSensors(sensor1_vl53l4cd_sat, sensor2_vl53l4cd_sat, sensor1add, sensor2add);
}