Skip to content

Instantly share code, notes, and snippets.

@hgdeoro
Created June 5, 2011 14:43
Show Gist options
  • Save hgdeoro/1009006 to your computer and use it in GitHub Desktop.
Save hgdeoro/1009006 to your computer and use it in GitHub Desktop.
Show memory usage of Arduino using PyArduinoProxy and JS Prototypes
var ram = proxy.globalData()['arduino_type_struct']['ram_size_bytes'];
var free = proxy.getFreeMemory();
var pc = Math.floor((free/ram)*100);
logMessage("Free ram: " + free + " bytes of " + ram + " bytes (" + pc + "% free).");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment