Fixed calibration routine, moved initialization in main process below PROCESS_BEGIN()