HELP I cant get the arduino to stay on the serial port

holmes4:
What I think is happening is that your code is jumping to a random location from your switch statement.

What are are out sending to the arduino. For example typing a 1 into the serial monitor and then sending it does not get you 1 from serial.read() it gets you the numeric value of the ascii char "1" which is the number (dec) 49!.

You could try using a default: statement in the switch.

Mark

Thank you, I will try adding the default statement asap.