Serial monitor data coming back corrupted

Hey guys, for some reason when watching my serial monitor for testing this code, i am receiving little question mark emoji looking characters. Any solutions???

int sequence[30];
int currentSize = 0;

void append(int value) {
  sequence[currentSize++] = value;
}

void setup() {
randomSeed(analogRead(0));
Serial.begin(9600);

for(int i; i<10; i++){
  append(random(3));
  Serial.print(sequence[i]);
}


}
1 Like

Hi,
Have you got the IDE baud rate set at 9600 as well.

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

Yes I tried that, didn’t work, but I have solved the problem now, by simply adding a delay from when the serial board begins and when it is printed.

Thanks though

1 Like

What board do you have? There are solutions for firmware based Serial boards.

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