added relay sketch for calibration