added hardware test for servo, sharing percentage_diff function