A program to automatically tune a guitar. Written by Justin Reidhead and Steven Swenson
Dependencies: FFT FrequencyFinder Motor NewTextLCD PinDetect mbed strings
Diff: Motor/Motor.cpp
- Revision:
- 5:c0fd99f07536
- Parent:
- 2:9c0a83c5ded5
- Child:
- 8:651fbf5ae98a
--- a/Motor/Motor.cpp Mon Apr 16 23:17:49 2012 +0000 +++ b/Motor/Motor.cpp Tue Apr 17 19:46:33 2012 +0000 @@ -1,7 +1,7 @@ #include "Motor.h" Motor::Motor(PinName enable,PinName direction,PinName step) : _enable(enable), _direction(direction), _step(step) { - +_enable=1; } Motor::~Motor() { @@ -9,7 +9,7 @@ void Motor::motor_turn(int direction, int steps) { _enable=0; - float freq=1000;//frequency of PWM signal to drive stepper motor + float freq=100;//frequency of PWM signal to drive stepper motor _step.period(1/freq); _step.write(.5); _direction=direction;