I tried Serial.print an array I had made, but the Arduino displays nothing in the monitor.
I tried doing Serial.print("Hehehe"); as a test, but it just displayed "h?h?h?".
The monitor works fine with other sketches than this one.
Anyone knows why?
int my_array[10];
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
for (int i = 0; i < 10; i++){
my_array[i] = i * 5;
}
}
void loop() {
// put your main code here, to run repeatedly:
for (int i = 0; i < 10; i++){
Serial.print(my_array[i]);
Serial.print(" ");
}
Serial.println();
delay(1000);
}
my_array[10]
. It's undefined if that hurts or not.i < 11
it should be 10