fixes scale for analogWrite(), adds forward and reverse functions