ESP32 All in One WiFi / BLE / OTA / MQTT / WebSerial

I wanted to program with lesser code size but when WiFi / BLE / OTA / MQTT / WebSerial features are added the code is very large with default esp32 setting unable to program tried with minimal spiffs with 1.9MB program with OTA, it works but when updating need to do several time just to update Please help in reducing code and improving mqtt and OTA update easy

Did you forget to post your code ?

Please post your sketch, using code tags when you do

In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

1 Like

The easier solution wil be to find an ESP32-Board with 16MB flash
https://de.aliexpress.com/item/32883116057.html

1 Like

Do you think that there is a secret technique which reduced the size of the every code to factor two or three by including a couple commands in the sketch? :slight_smile:
No, there is no such thing.
In any case, code optimization is a complex and painstaking work and it is primarily up to you, as the author, to do it. And of course, it is impossible to even advise anything on this topic without seeing the code itself

1 Like