adding a send_cmd function and starting to script the calibration phase