Fixed motor logic

Was written for high-on logic not low-on logic. Fixed. Also the frequency
has been moved out of the audible range.