Page 1 of 1

[SOLVED]clearing changes and listing resources used

Posted: Sat Dec 14, 2019 6:46 pm
by dps
Hello all,
I was thinking that it may be a good idea to see how much of your microcontrollers different resources are being used, or "filled" rather. Is there a command to check this, while in a repl?

Also, is there a way to clear all of the things that you had done to it, like importing libraries or creating directories and data? Like maybe a command or something....

cheers!

Re: clearing changes and listing resources used

Posted: Sun Dec 15, 2019 9:46 am
by pythoncoder
dps wrote:
Sat Dec 14, 2019 6:46 pm
Hello all,
I was thinking that it may be a good idea to see how much of your microcontrollers different resources are being used, or "filled" rather. Is there a command to check this, while in a repl?

Also, is there a way to clear all of the things that you had done to it, like importing libraries or creating directories and data? Like maybe a command or something....

cheers!

Code: Select all

import micropython, gc, uos
gc.collect()
micropython.mem_info()  # Or use arg 1 for more detail
uos.statvfs('/flash')

Code: Select all

import machine
machine.reset()

Re: clearing changes and listing resources used

Posted: Tue Dec 17, 2019 7:46 am
by dps
OH MAN! Thank you so much!