Problems using serial port

You need to test for Serial1.available before trying to read it.

And, I would get rid of the delay.