Go Down

Topic: 2-dimensional array of longs and memory issues (Read 620 times) previous topic - next topic

jonjib

I was a little reluctant to post the code, because: A) Its kind of long, so it seems like a lot to ask for anyone to read it through. B) It's kind of messy, not exactly my proudest work.

But here it is (had to use pastebin because it exceeded the max post size for this forum):
http://pastebin.com/0TtW04P9

AWOL

There seems to be a fair amount of this:
Code: [Select]
  for(int i = 1; i < 6; i++) {

Any reason for not using index zero?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

jonjib


There seems to be a fair amount of this:
Code: [Select]
  for(int i = 1; i < 6; i++) {

Any reason for not using index zero?



Not really... it's kind of a long story. I had some other problems earlier with communicating between arduinos and at the time it seemed like one of the problems I had was that sending a byte like 0x00 would not register as a sent byte on the other end, so instead of counting from 0 I switched to counting from 1 to get around this. In hindsight that probably wasn't the real problem I was having at the time, but anyway I just kept it like that to keep from screwing things up by changing it back to starting from 0 (I had bigger problems to deal with). I know there's a lot of stuff like that which could really be done a lot neater/better, but at the time, fixing things like that seemed a bit like giving the car a new shiny wax coat while both the engine and transmission were broken...

Go Up