Skip to content

Instantly share code, notes, and snippets.

@choonewza
Created January 26, 2020 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save choonewza/215b029610339e8a6876c652f0406812 to your computer and use it in GitHub Desktop.
Save choonewza/215b029610339e8a6876c652f0406812 to your computer and use it in GitHub Desktop.
Content CAT LoRa Lab 12 - Memory Free 1
#include <MemoryFree.h> //https://github.com/mpflaga/Arduino-MemoryFree
void setup() {
Serial.begin(115200);
while(!Serial);
}
void loop() {
String *msg = new String("55555");
showFreeMemory();
delay(1000);
}
void showFreeMemory() {
Serial.print(F("############ FREE RAM => ")); //F function does the same and is now a built in library, in IDE > 1.0.0
Serial.print(freeMemory(), DEC); // print how much RAM is available..
Serial.println(F(" ############"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment