I made 6 arrays all the same method but when i try to print each of their 6th index only the first 3 arrays that i made work, Could this be a storage issue even though it tells me
"sketch uses 8206 bytes (25%) of program storage space. Maximum is 32256 bytes.
Global variables use 856 bytes (41%) of dynamic memory, leaving 1192 bytes for local variables. Maximum is 2048 bytes."
#include <Stepper.h>
const int stepsPerRevolution = 100; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper whiteStepper(stepsPerRevolution, 8, 9, 10, 11);
void setup() {
}
void loop() {
Serial.begin(9600);
//Setting up the white face
Serial.println("With the white side towards you and the red end facing up enter the colors of each square by typing");
Serial.println("for example 'wrbgwybog'.");
while (Serial.available() == 0) {}
String topWhite = Serial.readString();
String aW = topWhite.substring(0, 1);
String bW = topWhite.substring(1, 2);
String cW = topWhite.substring(2, 3);
String dW = topWhite.substring(3, 4);
String wCore = topWhite.substring(4, 5);
String fW = topWhite.substring(5, 6);
String gW = topWhite.substring(6, 7);
String hW = topWhite.substring(7, 8);
String iW = topWhite.substring(8, 9);
String white[] = {aW, bW, cW, dW, wCore, fW, gW, hW, iW};
//Setting up the Blue face
Serial.println("With the Blue side towards you and the white end facing up enter the colors of each square by typing");
while (Serial.available() == 0) {}
String topBlue = Serial.readString();
String aB = topBlue.substring(0, 1);
String bB = topBlue.substring(1, 2);
String cB = topBlue.substring(2, 3);
String dB = topBlue.substring(3, 4);
String bCore = topBlue.substring(4, 5);
String fB = topBlue.substring(5, 6);
String gB = topBlue.substring(6, 7);
String hB = topBlue.substring(7, 8);
String iB = topBlue.substring(8, 9);
String blue[] = {aB, bB, cB, dB, bCore, fB, gB, hB, iB};
//Setting up the Orange face
Serial.println("With the Orange side towards you and the white end facing up enter the colors of each square by typing");
while (Serial.available() == 0) {}
String topOrange = Serial.readString();
String aO = topOrange.substring(0, 1);
String bO = topOrange.substring(1, 2);
String cO = topOrange.substring(2, 3);
String dO = topOrange.substring(3, 4);
String oCore = topOrange.substring(4, 5);
String fO = topOrange.substring(5, 6);
String gO = topOrange.substring(6, 7);
String hO = topOrange.substring(7, 8);
String iO = topOrange.substring(8, 9);
String orange[] = {aO, bO, cO, dO, oCore, fO, gO, hO, iO};
//Setting up the Green face
Serial.println("With the Green side towards you and the white end facing up enter the colors of each square by typing");
while (Serial.available() == 0) {}
String topGreen = Serial.readString();
String aG = topGreen.substring(0, 1);
String bG = topGreen.substring(1, 2);
String cG = topGreen.substring(2, 3);
String dG = topGreen.substring(3, 4);
String gCore = topGreen.substring(4, 5);
String fG = topGreen.substring(5, 6);
String gG = topGreen.substring(6, 7);
String hG = topGreen.substring(7, 8);
String iG = topGreen.substring(8, 9);
String green[] = {aG, bG, cG, dG, gCore, fG, gG, hG, iG};
//Setting up the Red face
Serial.println("With the Red side towards you and the white end facing up enter the colors of each square by typing");
while (Serial.available() == 0) {}
String topRed = Serial.readString();
String aR = topRed.substring(0, 1);
String bR = topRed.substring(1, 2);
String cR = topRed.substring(2, 3);
String dR = topRed.substring(3, 4);
String rCore = topRed.substring(4, 5);
String fR = topRed.substring(5, 6);
String gR = topRed.substring(6, 7);
String hR = topRed.substring(7, 8);
String iR = topRed.substring(8, 9);
String red[] = {aR, bR, cR, dR, rCore, fR, gR, hR, iR};
//Setting up the Yellow face
Serial.println("With the Yellow side towards you and the Red end facing up enter the colors of each square by typing");
while (Serial.available() == 0) {}
String topYellow = Serial.readString();
String aY = topYellow.substring(0, 1);
String bY = topYellow.substring(1, 2);
String cY = topYellow.substring(2, 3);
String dY = topYellow.substring(3, 4);
String yCore = topYellow.substring(4, 5);
String fY = topYellow.substring(5, 6);
String gY = topYellow.substring(6, 7);
String hY = topYellow.substring(7, 8);
String iY = topYellow.substring(8, 9);
String yellow[] = {aY, bY, cY, dY, yCore, fY, gY, hY, iY};
//test the arrays
Serial.println(white[6]);
Serial.println(blue[6]);
Serial.println(orange[6]);
delay(5000);
Serial.println(green[6]);
Serial.println(red[6]);
Serial.println(yellow[6]);
delay(1000000);
int i = 0;
while (i < 258) {
whiteStepper.setSpeed(100);
whiteStepper.step(stepsPerRevolution / 100);
i++;
if (i >= 258) {
delay(2000);
i = 0;
}
}
}