-->
Page 2 of 3

Re: File I/O - read and write

PostPosted: Sun Jan 17, 2016 9:59 am
by cwilt
kennedyd wrote:I'm using an ESP-12 module. When flashing ESPBasic onto the module, I selected 1M as the flash size.
flashfree()_ returns 474139


I thought the ESP-12 was to be flashed as a 4M flash size.

Re: File I/O - read and write

PostPosted: Sun Jan 17, 2016 12:10 pm
by Mmiscool
An esp-12 should use the 4m version.

On a side note this has been identified as a bug. It will be fixed with the new version. I am running the build right now and it should be uploaded in a couple of minuets.

memclear will erase all of the variables in memory and is probably not the right approach. The program will read the correct file this time.

Re: File I/O - read and write

PostPosted: Sun Jan 17, 2016 1:26 pm
by kennedyd
That's working well now! Thanks for your help.

Re 'memclear' ... I didn't see mention of this in the docs. Must have missed it ... or perhaps it's a standard BASIC thing that I'm not used to (my knowledge of BASIC is very old and tired).

It certainly sorts the problem that I was seeing.

What exactly does 'memclear' do? Does it have any side-effects on other variables?

Re: File I/O - read and write

PostPosted: Sun Jan 17, 2016 2:33 pm
by Mmiscool
Yes. It literally delete all of the variables from memory. Any thing g you tucked away in a variable before running the command will be gone.