So i have a small piece of code:
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(115200);
while (!Serial) {
Serial.write("pls work!"); // wait for serial port to connect. Needed for native USB port only
}
Serial.println("setup fine");
}
void loop() { // run over and over
if (Serial.available()) {
Serial.write(Serial.read());
}
}
and if i upload it to my MEGA 2560, it says it only uses 2% of the dynamic memory but if i try to upload it to my ESP8266-12 which is on a different port it says it uses 32%. But what i have noticed is that, the 32% was from a different much larger piece of code and i might be wrong about this but i feel like it is trying to upload that code all the time because that code connects to my wifi and everytime i flash the small code to my ESP, the ESP keeps connecting back to my wifi.
The funny thing is that when i first uploaded the small code to my ESP is worked perfectly but i honestly for the life of me don't know what i did or changed after that that made it this way!
I followed this video's instructions:
Does anyone know why is that and how can i fix it, plzz?
I really need this issue to be fixed ASAP as i have a project due soon!