Serial monitor command input with code

Please post the sketch that does the calibration when user enters enterph in the Serial monitor

In order to do what you want the Pi has to send that command over a Serial link to the Arduino instead of it coming from the Serial monitor