if (Serial.available() > 0) {
inByte = Serial.read();
if (inByte == '#') {
while (pointer < 4) {
buffer[pointer] = Serial.read( ); // add the character to the buffer
Check to see if at least one character is available, then read all five of them.
Not good.
Why not check to see if you've got a character before reading it?
it seems to effect the Arduino. Almost as if it's resetting it?
Yes, it is resetting - that is what it is designed to do.
Serial is set at 9600 baud (could this be causing it?)
Shouldn't be a problem.
How are you powering the servo?