Try replacing this line
HardwareSerial SerialAT(1);
by
#define SerialAT Serial1
Post complete code that shows the problem. If above posted code already show the problem, post the output you get in the serial monitor.
Try replacing this line
HardwareSerial SerialAT(1);
by
#define SerialAT Serial1
Post complete code that shows the problem. If above posted code already show the problem, post the output you get in the serial monitor.