Problem with write () and read ()
Posted:
Mon Oct 17, 2016 2:30 pm
by rodrigocirilo
Hello everyone..
I'm doing a test here to write to "eeprom" any value and then assign that value to a variable and then print on the screen (browser). however gives this error:
Error at line 2: Failed to reach end of input expression, likely malformed input
Error at line 2: Syntax error
Error at line 2: Halted
Code: Select allx = 0
write (save1,100)
print (x)
delay 1000
x = read(save1)
print (x)
Re: Problem with write () and read ()
Posted:
Mon Oct 17, 2016 3:05 pm
by Electroguard
Remove the space between the write instruction and the opening bracket, ie write(.
Re: Problem with write () and read ()
Posted:
Tue Oct 18, 2016 5:18 am
by rodrigocirilo
Electroguard wrote:Remove the space between the write instruction and the opening bracket, ie write(.
Thank you dear friend.
I tested it and it worked !!
Now tell me who you know, how many addresses can I use?
Re: Problem with write () and read ()
Posted:
Tue Oct 18, 2016 11:11 am
by Electroguard
I think something has been lost in translation, cos I don't think you'd want to know my neighbours, nor see my Xmas card list.
I'd guess you are asking how many variables you can write to flash memory then reliably read back ok, but that is a bit like asking how long is a piece of string - you are not going to get a definitive answer because it will depend on what device you are using, how much flash memory it has available, and presumably on how long are your variable names and their related data.
But don't worry about it!
Just keep using the flashfree() instruction periodically to see how much flash memory you still have remaining after writing a load more variables to it... you should be able to see when you're getting too low.