pH sensor code

what u mean cannot do that?

There is nothing ambiguous about the statement "You can not do that". If you don't understand that pins 0 and 1 can be used by the HardwareSerial instance (Serial) OR by the SoftwareSerial instance (mySerial), but not by both, I can't help you.