Random garbage out of Serial monitor

Having real garbage issues with Serial.print. Im using the 2.3.2 version.
YES my Serial monitor is at 9600 (just like my code)

So I have a 3D array (only partially filled out) and global vars/const here :

const int NUM_ROOMS = 11;
const int MAX_STEPS = 7;

const short UP = 1;
const short DOWN = -1;
const short RIGHT = 10;
const short LEFT = -10;

char facingDirection = 'N';
/*
________________________
|-23 -13 -3  7 17 27 37 |
|-24 -14 -4  6 16 26 36 |
|-25 -15 -5  5 15 25 35 |
|-26 -16 -6  4 14 24 34 |
|-27 -17 -7  3 13 23 33 |
|-28 -18 -8  2 12 22 32 | 
|-29 -19 -9  1 11 21 31 |
|-30 -20 -10 0 10 20 30 | 
|____________^___________

(floor 2 could just be +100 or smthn)
*/
const int roomToRoom[NUM_ROOMS][NUM_ROOMS][MAX_STEPS]{
  {
    //Entrence
    {},                                               //To Entrence
    { LEFT, DOWN },                                   //To R1
    { LEFT, LEFT, DOWN },                             //To R2
    { LEFT, LEFT, UP, RIGHT },                        //To R3
    { LEFT, LEFT, UP, LEFT },                         //To R4
    { LEFT, LEFT, UP, UP, RIGHT },                    //To R5
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT },              //To R6
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT, UP },          //To R7
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN },        //To R8
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN, LEFT },  //To R9
    { RIGHT, DOWN, RIGHT, DOWN, LEFT, DOWN },         //To R10
  }
};

(Although it dosen't really matter, this code is a basis for a pathfinding code Im writing where the 3D array will hold directions from one room to any other room. The diagram shows how I want this to be done but its overall unimportant.)

Now I started with setup like this:

  Serial.begin(9600);
  Serial.println("START");
  Serial.println();
  for (int i = 0; i < NUM_ROOMS; i++) {  //Prints all items
    Serial.print("**********ROOM #");
    Serial.print(i);
    Serial.print("**********");
    delay(100);
    printArray(MAX_STEPS, 1, roomToRoom[0][i]);
    Serial.println();
  }

This works! Output here:

START
**********ROOM #0**********
0 0 0 0 0 0 0 

**********ROOM #1**********
-10 -1 0 0 0 0 0 

**********ROOM #2**********
-10 -10 -1 0 0 0 0 

**********ROOM #3**********
-10 -10 1 10 0 0 0 

**********ROOM #4**********
-10 -10 1 -10 0 0 0 

**********ROOM #5**********
-10 -10 1 1 10 0 0 

**********ROOM #6**********
10 -1 10 -1 10 0 0 

**********ROOM #7**********
10 -1 10 -1 10 1 0 

**********ROOM #8**********
10 -1 10 -1 10 -1 0 

**********ROOM #9**********
10 -1 10 -1 10 -1 -10 

**********ROOM #10**********
10 -1 10 -1 -10 -1 0 
// For those curious what "printArray" is
void printArray(int xLength, int yLength, const int myArray[]) {
  Serial.println("");
  for (int i = 0; i < yLength; i++) {
    for (int j = 0; j < xLength; j++) {
      Serial.print(myArray[i * xLength + j]);  // Adjusted indexing
      Serial.print(" ");
      delay(10);
    }
    Serial.println("");
  }
}

All is fine and dandy right? I think the next step is making a function that converts 1 -> up/10 -> left and so on:

String cacPlaySound(int intDirection) { //Please ignore naming, its for later in the project
//Since I made a 2D map, N is up, E is left and so on...
  switch (facingDirection) {
    case 'N':
      if (intDirection == 1) {
        return "Fwd";
      } else if (intDirection == 10) {
        return "Rht";
        facingDirection = 'E';
      } else if (intDirection == -10) {
        return "Lft";
        facingDirection = 'W';
      } else if (intDirection == -1) {
        return "Bck";
      }
      break;
    case 'S':
      if (intDirection == -1) {
        return "Fwd";
      } else if (intDirection == -10) {
        return "Rht";
        facingDirection = 'W';
      } else if (intDirection == 10) {
        return "Lft";
        facingDirection = 'E';
      } else if (intDirection == 1) {
        return "Bck";
      }
      break;
    case 'E':
      if (intDirection == 10) {
        return "Fwd";
      } else if (intDirection == -1) {
        return "Rht";
        facingDirection = 'S';
      } else if (intDirection == 1) {
        return "Lft";
        facingDirection = 'N';
      } else if (intDirection == -10) {
        return "Bck";
      }
      break;
    case 'W':
      if (intDirection == -10) {
        return "Fwd";
      } else if (intDirection == 1) {
        return "Rht";
        facingDirection = 'N';
      } else if (intDirection == -1) {
        return "Lft";
        facingDirection = 'S';
      } else if (intDirection == 10) {
        return "Bck";
      }
      break;
    default:
      return "ERROR 2";
      break;
  }
  return "ERROR 1";
}

Turns out that was a mistake. New setup and output below:

void setup() {
  Serial.begin(9600);
  Serial.println("START");
  Serial.println();
  for (int i = 0; i < NUM_ROOMS; i++) {  //For every room
    Serial.print("************ROOM #");
    Serial.print(i);
    Serial.println("************");
    for (int j = 0; j < MAX_STEPS; j++) {  //For every step
      Serial.print("step #");              // Print step #
      Serial.print(j + 1);
      Serial.print(" = ");
      int myNextDirection = roomToRoom[0][i][j];
      if (myNextDirection == 0) {  //If there are no instructions, say so and move on
        Serial.println("DONE");
        delay(20);
        continue;
      }
      Serial.print(myNextDirection);  //Print # in the array (works)
      Serial.print(", ");
      Serial.print(cacPlaySound(myNextDirection));  //Print formmated direction (breaks)
      Serial.println();
    }
  }

OUTPUT:

************ROOM #0************
step #1 = DONE
step #2= DONE
step #3 = DONE
step #4 = DONE
step #5 = DONE
step #6= DONE
step #7 = DONE
************ROOM #1*�$13#�V2�$13#�S���������aa�������$13#�T��$13#�X>�$13#�T
.... (NEVER ends)

"Well that sucks" I say "Lets try setting it to a set value and testing". Lo and behold, it breaks again:

//...
      Serial.print(myNextDirection);  //Print # in the array (works)
      Serial.print(", ");
      myNextDirection = 1; // <-------
      Serial.print(cacPlaySound(myNextDirection));  //Print formmated direction (breaks)
/...

OUTPUT:

step #7 = DONE
************ROOM #6************
step #1 = 10, 
step #2 = -1, 
step #3 = 10, 
step #4 = -1, 
step #5 = 10, 
step #6 = DONE
step #7 = DONE
************ROOM #7************
step #1 = 10, 
step #2 = -1, 
step #3 = 10, 
step #4 = -1, 
step #5 = 10, 
step #6 = 1, 
step #7 = DONE
************ROOM #8************
step #1 = 10, 
step #2 = -1, 
step #3 = 10, 
step #4 = -1, 
step #5 = 10, 
step #6 = -1, 
step #7 = DONE
************ROOM #9************
step #1 = 10, 
step #2 = -1, 
step #3 = 10, 
step #4 = -1, 
step #5 = 10, 
step #6 = -1, 
step #7 = -10, 
************ROOM #10************
step #1 = 10, 
step #2 = -1, 
step #3 = 10, 
step #4 = -1, 
step #5 = -10, 
step #6 = -1, 
step #7 = DONE
//Cant even understand why it dosent work, there are defaults in the switch statement

Well lets try a less complicated function:

//(Same setup code as last time w/ set direction being 1)
String cacPlaySound(int intDirection) {
  if (intDirection == 1) {
    Serial.println("Up");
  } else if (intDirection == 10) {
    Serial.println("Rht");
  } else if (intDirection == -1) {
    Serial.println("Dwn");
  } else if (intDirection == -10) {
    Serial.println("Lft");
  } else {
    Serial.print("ERROR");
    Serial.print("Was passed " + String(intDirection));
  }
}

OUTPUT:

// # on left is diff b/c we only set value to 1 after printing actual value of array
************ROOM #0************
step #1 = DONE
step #2 = DONE
step #3 = DONE
step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #1************
step #1 = -10, Up

step #2 = -1, Up

step #3 = DONE
step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #2************
step #1 = -10, Up

step #2 = -10, Up

step #3 = -1, Up

step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE

//(and so on)

"Great! Now lets get rid of the manual set!". Whaddya know? Broken again:
OUTPUT:

************ROOM #0*****������
&ONE
step #2 = DONE
step #3 = DONE
step #4������
&ONE
step #6 = DONE
step #7 = DONE
*******���������****�$�$ = -10, Lft
�$S����������@�$'(a
#�Sa�a����@��X��
(Actually stops here)

Same thing if we go back to complicated function.
Also, YES my baud rate is 9600 on monitor.
I tried 115200 baud and I get same errors.
Anyone have any ideas? Im grasping at straws here. Only possible solution I can think of is my Arduino is broken but its been working fine until now. Ill get a new one tmrw.

I was too slow… had the same word in mind, you didn't keep your promise.

It can actually cause literally anything to happen.

a7

1 Like

@Delta_G & @alto777 , both of you are so right that I didn't return (my bad). However, similar output is produced:
New func:

String cacPlaySound(int intDirection) {
  if (intDirection == 1) {
    Serial.println("Up");
    return "Up";
  } else if (intDirection == 10) {
    Serial.println("Rht");
    return "Rht";
  } else if (intDirection == -1) {
    Serial.println("Dwn");
    return "Dwn";
  } else if (intDirection == -10) {
    Serial.println("Lft");
    return "Lft";
  } else {
        return "ERROR";
    Serial.print("ERROR");
    Serial.print("Was passed " + String(intDirection));
  }
}

OUT:

START

************ROOM #0************
step #1 = DONE
step #2 = DONE
step #3 = DONE
step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #1***�$-.7#� = -10, Lft
Lft
s252 = -1, Dwn
��
s247 = DONE
s248 = DONE
s249 = DONE
s250 = D4�T������
& Lft
��
s247 = -10, �$348#�V������
&
s249 = DONE
s

You are very correct. Was not looking at compiling XD

Sketch uses 5416 bytes (16%) of program storage space. Maximum is 32256 bytes.
Global variables use 1970 bytes (96%) of dynamic memory, leaving 78 bytes for local variables. Maximum is 2048 bytes.

ya 96% is a tad high. Trying w/ a mega now
(Side note, any way to make it smaller?)

Ok. Cant get my hands on a Mega rn (the one I have needs its bootloader to be burned apparently). Ill update tmrw morning.

Put this in PROGMEM. I am not sure it would be there if you didn't go to some trouble to make it be there.

I am also curious about how big the numbers might get in there, do you need 16 bits?

And if 8 is def too small, there are ways to code for, say, 12 bit numbers. At some point the extra code will be justified by the savings in space.

Also I cannot analyze all your code, but now that you are returning a String I want to see why… internally, integers can code for all that text, and only when humans need to see text need you translate the numbers to text. An array of C strings is handy, viz:

    char *directionNames[] = {"Right", Down", Left", Up"};

This might be step one in moving away from using Strings at all, which in the case of programming the UNO is a Good Idea.
a7

2 Likes

You might like to try the wokwi simulator which has a very low cost Mega in stock at all times.

a7

1 Like

You can use the F-macro for print statements like Serial.println("Up");. E.g. Serial.println(F("Up"));
You can move arrays that are const to PROGMEM (PROGMEM - Arduino Reference).

1 Like

Will prob move to PROGMEM. Ive seen it before but have been scared to do anything with it. In terms of the numbers being stored, the range is -10 -> 10 (so 4 bits actually) for now. I actually dont know how to make a data type smaller than a short (again, ive seen others but dont know myself so ive stayed away). Im also thinking an Enumerator might work. Ive read about that one.
Thank you again!

If you use PROGMEM, you'll less.

But right away using the byte type which I believe is Arduino speak for signed char, 8 bits.

That's half the storage.

If you make "for now" "forever", then the last vector can, with minimal code that could be a function or a macro for convenience and readability, hold two values in each byte.

That's half of half the storage. One quarter by my figuring.


On the other matter

    char *directionNames[] = {"Right", Down", Left", "Up"};

I forgot to add

enum directionCode {RIGHT = 0, DOWN, LEFT, UP};

then your code, when it ever needs to explicitly refer to what was once a String and comparison or lookup or whatever, can just use the enumeration identifiers.

    newDirection = RIGHT;
    Serial.print("now moving );
    Serial.println(directionNames[RIGHT]);     // contrived. get over it.

And even

  for (int ii = RIGHT; ii <= UP; ii++) { // loop over four directions. ii _is_ the direction
    Serial.print("now moving );
    Serial.println(directionNames[ii]);
  }

a7

SUCCESS!!!!!

Putting it into PROGMEM made a HUGE difference. Easier than I thought too!

Sketch uses 4578 bytes (14%) of program storage space. Maximum is 32256 bytes.
Global variables use 276 bytes (13%) of dynamic memory, leaving 1772 bytes for local variables. Maximum is 2048 bytes.

(Not sure if you know this, but 13 is smaller than 96 lol )

const byte roomToRoom[NUM_ROOMS][NUM_ROOMS][MAX_STEPS] PROGMEM ={
  {
    //Entrence
    {},                                               //To Entrence
    { LEFT, DOWN },                                   //To R1
    { LEFT, LEFT, DOWN },                             //To R2
    { LEFT, LEFT, UP, RIGHT },                        //To R3
    { LEFT, LEFT, UP, LEFT },                         //To R4
    { LEFT, LEFT, UP, UP, RIGHT },                    //To R5
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT },              //To R6
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT, UP },          //To R7
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN },        //To R8
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN, LEFT },  //To R9
    { RIGHT, DOWN, RIGHT, DOWN, LEFT, DOWN },         //To R10
  }
};
//...
    int myNextDirection = pgm_read_word(&roomToRoom[0][i][j]);
      if (myNextDirection == 255) { //Unsigned int so -1 = 255 & -10 = 246
        myNextDirection = -1;
      } else if (myNextDirection == 246) {
        myNextDirection = -10;
      }

Almost made a big oopsie with my switch statement b/c changing the direction was AFTER the return but I cought it.

OUT:

START

************ROOM #0************
step #1 = DONE
step #2 = DONE
step #3 = DONE
step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #1************
step #1 = -10, Lft, W
step #2 = -1, Lft, S
step #3 = DONE
step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #2************
step #1 = -10, Lft, W
step #2 = -10, Fwd, W
step #3 = -1, Lft, S
step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #3************
step #1 = -10, Lft, W
step #2 = -10, Fwd, W
step #3 = 1, Rht, N
step #4 = 10, Rht, E
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #4************
step #1 = -10, Lft, W
step #2 = -10, Fwd, W
step #3 = 1, Rht, N
step #4 = -10, Lft, W
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #5************
step #1 = -10, Lft, W
step #2 = -10, Fwd, W
step #3 = 1, Rht, N
step #4 = 1, Fwd, N
step #5 = 10, Rht, E
step #6 = DONE
step #7 = DONE
************ROOM #6************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = 10, Lft, E
step #6 = DONE
step #7 = DONE
************ROOM #7************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = 10, Lft, E
step #6 = 1, Lft, N
step #7 = DONE
************ROOM #8************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = 10, Lft, E
step #6 = -1, Rht, S
step #7 = DONE
************ROOM #9************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = 10, Lft, E
step #6 = -1, Rht, S
step #7 = -10, Rht, W
************ROOM #10************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = -10, Rht, W
step #6 = -1, Lft, S
step #7 = DONE


If i feel im running out of mem again, ill use enumerators.

Exactly what I wanted. Thank you so much!

I can't now, but it some of the that 255/246 type wizardry can be stepped around, usually C/C++ can take care of the signed char (byte) tyle without us needing to do things like that.

On the other hand, I use unsigned char, and have been known to check the MSB to do my own negative values, particularly negative one 255 0xff.

You have oodles of storage now, but if there are eight or fewer distinct values three bits woukd suffice, and if there were only four or fewer two bits woukd suffice.

With some code, and possible at the expense of readability. Most programs that do amazing things with limited resources get a little clever here and there.

If you have a complete sketch you can post, please do. Many pairs of eyes might see some things. I am curious always to see how Strings are used; usually such can be eliminated by a change of one kind or another, or a switch to use o& C character arrays, which you want to know all about one day no matter you prefer to use, and have no trouble with, Strings.

a7

Full code:

const bool debug = true;
const int NUM_ROOMS = 11;
/* 
Best if even # bc we only need to to half of the rooms
b/c getting from room 2 -> room 1 is just room 1 -> room 2 reversed
*/
const int MAX_STEPS = 7;

const byte UP = byte(1);
const byte DOWN = byte(-1);  //Saved as 255 or 11111111
const byte RIGHT = byte(10);
const byte LEFT = byte(-10);  //Saved as 246 or 11110110

char facingDirection = 'N';

/*
________________________
|-23 -13 -3  7 17 27 37 |
|-24 -14 -4  6 16 26 36 |
|-25 -15 -5  5 15 25 35 |
|-26 -16 -6  4 14 24 34 |
|-27 -17 -7  3 13 23 33 |
|-28 -18 -8  2 12 22 32 | 
|-29 -19 -9  1 11 21 31 |
|-30 -20 -10 0 10 20 30 | 
|____________^___________

(floor 2 could just be +100 or smthn)
*/
const byte roomToRoom[NUM_ROOMS][NUM_ROOMS][MAX_STEPS] PROGMEM = {
  {
    //Entrence
    {},                                               //To Entrence
    { LEFT, DOWN },                                   //To R1
    { LEFT, LEFT, DOWN },                             //To R2
    { LEFT, LEFT, UP, RIGHT },                        //To R3
    { LEFT, LEFT, UP, LEFT },                         //To R4
    { LEFT, LEFT, UP, UP, RIGHT },                    //To R5
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT },              //To R6
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT, UP },          //To R7
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN },        //To R8
    { RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN, LEFT },  //To R9
    { RIGHT, DOWN, RIGHT, DOWN, LEFT, DOWN },         //To R10
  }
};

String cacPlaySound(int intDirection);

void setup() {
  Serial.begin(9600);
  Serial.println("START");
  Serial.println();
  // for (int i = 0; i < NUM_ROOMS; i++) {  //Prints all items
  //   Serial.print("**********ROOM #");
  //   Serial.print(i);
  //   Serial.print("**********");
  //   delay(100);
  //   printArray(MAX_STEPS, 1, roomToRoom[0][i]);
  //   Serial.println();
  // }
  for (int i = 0; i < NUM_ROOMS; i++) {  //For every room
    Serial.print("************ROOM #");
    Serial.print(i);
    Serial.println("************");
    facingDirection = 'N';
    for (int j = 0; j < MAX_STEPS; j++) {  //For every step
      Serial.print("step #");              // Print step #
      Serial.print(j + 1);
      Serial.print(" = ");
      int myNextDirection = pgm_read_byte(&roomToRoom[0][i][j]);

      if (myNextDirection == 255) {
        myNextDirection = -1;
      } else if (myNextDirection == 246) {
        myNextDirection = -10;
      }
      if (myNextDirection == 0) {  //If there are no instructions, say so and move on
        Serial.println("DONE");
        delay(20);
        continue;
      }

      Serial.print(myNextDirection);  //Print # in the array (works)
      Serial.print(", ");
      Serial.print(cacPlaySound(myNextDirection));  //Print formated direction
      Serial.print(", ");
      Serial.print(facingDirection);  //Print which direction user faces
      Serial.println();
    }
  }
}

void loop() {
  // put your main code here, to run repeatedly:
}
// String cacPlaySound(int intDirection) {
//   if (intDirection == 1) {
//     Serial.println("Up");
//     return "Up";
//   } else if (intDirection == 10) {
//     Serial.println("Rht");
//     return "Rht";
//   } else if (intDirection == -1) {
//     Serial.println("Dwn");
//     return "Dwn";
//   } else if (intDirection == -10) {
//     Serial.println("Lft");
//     return "Lft";
//   } else {
//         return "ERROR";
//     Serial.print("ERROR");
//     Serial.print("Was passed " + String(intDirection));
//   }
// }

String cacPlaySound(int intDirection) {
  switch (facingDirection) {
    case 'N':
      if (intDirection == 1) {
        return "Fwd";
      } else if (intDirection == 10) {
        facingDirection = 'E';
        return "Rht";
      } else if (intDirection == -10) {
        facingDirection = 'W';
        return "Lft";
      } else if (intDirection == -1) {
        facingDirection = 'S';
        return "Bck";
      }
      break;
    case 'S':
      if (intDirection == -1) {
        return "Fwd";
      } else if (intDirection == -10) {
        facingDirection = 'W';
        return "Rht";
      } else if (intDirection == 10) {
        facingDirection = 'E';
        return "Lft";
      } else if (intDirection == 1) {
        facingDirection = 'N';
        return "Bck";
      }
      break;
    case 'E':
      if (intDirection == 10) {
        return "Fwd";
      } else if (intDirection == -1) {
        facingDirection = 'S';
        return "Rht";
      } else if (intDirection == 1) {
        facingDirection = 'N';
        return "Lft";
      } else if (intDirection == -10) {
        facingDirection = 'W';
        return "Bck";
      }
      break;
    case 'W':
      if (intDirection == -10) {
        return "Fwd";
      } else if (intDirection == 1) {
        facingDirection = 'N';
        return "Rht";
      } else if (intDirection == -1) {
        facingDirection = 'S';
        return "Lft";
      } else if (intDirection == 10) {
        facingDirection = 'E';
        return "Bck";
      }
      break;
    default:
      return "ERROR 2";
      break;
  }
  return "ERROR 1";
}

void printArray(int xLength, int yLength, const int myArray[]) {
  Serial.println("");
  for (int i = 0; i < yLength; i++) {
    for (int j = 0; j < xLength; j++) {
      Serial.print(myArray[i * xLength + j]);  // Adjusted indexing
      Serial.print(" ");
      delay(10);
    }
    Serial.println("");
  }
}

OUT:

START

************ROOM #0************
step #1 = DONE
step #2 = DONE
step #3 = DONE
step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #1************
step #1 = -10, Lft, W
step #2 = -1, Lft, S
step #3 = DONE
step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #2************
step #1 = -10, Lft, W
step #2 = -10, Fwd, W
step #3 = -1, Lft, S
step #4 = DONE
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #3************
step #1 = -10, Lft, W
step #2 = -10, Fwd, W
step #3 = 1, Rht, N
step #4 = 10, Rht, E
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #4************
step #1 = -10, Lft, W
step #2 = -10, Fwd, W
step #3 = 1, Rht, N
step #4 = -10, Lft, W
step #5 = DONE
step #6 = DONE
step #7 = DONE
************ROOM #5************
step #1 = -10, Lft, W
step #2 = -10, Fwd, W
step #3 = 1, Rht, N
step #4 = 1, Fwd, N
step #5 = 10, Rht, E
step #6 = DONE
step #7 = DONE
************ROOM #6************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = 10, Lft, E
step #6 = DONE
step #7 = DONE
************ROOM #7************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = 10, Lft, E
step #6 = 1, Lft, N
step #7 = DONE
************ROOM #8************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = 10, Lft, E
step #6 = -1, Rht, S
step #7 = DONE
************ROOM #9************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = 10, Lft, E
step #6 = -1, Rht, S
step #7 = -10, Rht, W
************ROOM #10************
step #1 = 10, Rht, E
step #2 = -1, Rht, S
step #3 = 10, Lft, E
step #4 = -1, Rht, S
step #5 = -10, Rht, W
step #6 = -1, Lft, S
step #7 = DONE

Reminds me of the late '70s/early '80s, 3D (text), b@mb locating game.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.