serial communication using serial1

Assuming you have a Mega, then that code is fine.