Description
Board
LOLIN S2 MINI
Device Description
Rotary Encoder, OLED display, External EEprom, Buttons..
Hardware Configuration
i2c - SCL on GPIO 35, SDA on GPIO 33
SPI - MOSI 11, MISO 9, and SCK 7
Rotary Encoder is connected to GPIO 2 and 4.
Version
v3.0.4
IDE Name
Arduino IDE 2.3.3
Operating System
Windows 10
Flash frequency
240MHz
PSRAM enabled
yes
Upload speed
115200
Description
I tried to compile some code I wrote a few months ago and it compiled , but using 14% more flash memory. The code should use 66% of flash and now it compiles at 80%. also, when I flash the code to my device, the Encoder only work in General Settings, once it starts running through the main loop, the rotary encoder stops working. If I downgrade the ESP core to version 2.0.17, everything works fine again and the code compiles at 66% flash memory usage.
The same happens when I tried some library example, like for example the WifiManager. With the newer versions of the ESP core, the example "OnDemandConfigPortal" uses 80% of flash memory, and it only uses 74% when compiled with version 2.0.17.
Sketch
here is the WiFi Manager exaample code:
/**
* OnDemandConfigPortal.ino
* example of running the configPortal AP manually, independantly from the captiveportal
* trigger pin will start a configPortal AP for 120 seconds then turn it off.
*
*/
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
// select which pin will trigger the configuration portal when set to LOW
#define TRIGGER_PIN 0
int timeout = 120; // seconds to run for
void setup() {
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("\n Starting");
pinMode(TRIGGER_PIN, INPUT_PULLUP);
}
void loop() {
// is configuration portal requested?
if ( digitalRead(TRIGGER_PIN) == LOW) {
WiFiManager wm;
//reset settings - for testing
//wm.resetSettings();
// set configportal timeout
wm.setConfigPortalTimeout(timeout);
if (!wm.startConfigPortal("OnDemandAP")) {
Serial.println("failed to connect and hit timeout");
delay(3000);
//reset and try again, or maybe put it to deep sleep
ESP.restart();
delay(5000);
}
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
}
// put your main code here, to run repeatedly:
}
Debug Message
None.
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.