Internal memory issue? InternalMemory.write(102, 106);

Do you have a question on how to do something.
Ask in here.
Post Reply
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Internal memory issue? InternalMemory.write(102, 106);

Post by 00Warpig00 »

Not sure what is going on here...

I have the following line of code in my sketch that writes byte 106 to memory location 102.

InternalMemory.write(102, 106);

I have searched my entire sketch for any other lines that write memory location 102 and there are none that I can find, however if I read memory location 102 with the Android app it ALWAYS reports memory location 102 = 255

Any ideas how this is happening?

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Internal memory issue? InternalMemory.write(102, 106);

Post by rimai »

How many times have you written to that memory location?
Roberto.
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Internal memory issue? InternalMemory.write(102, 106);

Post by 00Warpig00 »

I don't know really. I don't remember ever using it in the past for anything. I just recently changed my code and moved that data that was being stored in 101 to 102 but reading 102 from the first time I ever remember using it reads as 255. Could I have had some code in the past that used it and possibly had it in my loop writing to that spot on every loop? I guess that may be possible, but i honestly do not remember using 102 before. Doesn't mean I didn't... lol back in the wee early days who knows...
180G FOWLR
20GH QT#1
29G QT#2

Image
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Internal memory issue? InternalMemory.write(102, 106);

Post by 00Warpig00 »

hmm I do have at least my last 5 versions of code still. maybe I will search those revs and see if I used them in the past and can't remember. Is this what happens when a memory location gets burned out?
180G FOWLR
20GH QT#1
29G QT#2

Image
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: Internal memory issue? InternalMemory.write(102, 106);

Post by 00Warpig00 »

ok I am guessing I killed that memory location.

I have 4 previous versions of code that wrote to 102 every loop cycle a new high temperature was observed. I remember now after looking at my old sketches. When I first set up my high\Low temp monitoring I wrote to that location every time there was a new high temp so I could read 102 using the android app from work and see what the high temp was... So every cycle the temp went up even by .1 degree it wrote to 102 and if the controller rebooted for any reason (and it was crashing allot with the IO Module plugged in at the time) It would start over going up from the temp at reboot time. So it has been written to a ton. I was also writing to 101 but it didnt see the wrath of the writing loop because the first loop was setting it to 0 and then it was never going below 0 in subsequent loops. so 101 still works.

The more I think about it... I think this is how I first learned you could burn out a memory location and changed my code to abandon writing in that loop and just set a live variable i could read instead of the memory location.

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Internal memory issue? InternalMemory.write(102, 106);

Post by rimai »

That could be it.
Luckily, you have thousands more to use :)
Roberto.
Post Reply