j
Dependencies: Encoder HIDScope mbed
Fork of Motor_component_testing by
Diff: main.cpp
- Revision:
- 1:0471de635f87
- Parent:
- 0:2240263f7068
- Child:
- 2:b7d757570748
--- a/main.cpp Thu Oct 23 09:09:24 2014 +0000 +++ b/main.cpp Thu Oct 23 09:40:10 2014 +0000 @@ -5,22 +5,22 @@ #define M1_PWM PTA5 #define M1_DIR PTA4 -Encoder motor1(PTD3,PTD1, true); +Encoder motor1(PTD3,PTD1); PwmOut pwm_motor1(M1_PWM); DigitalOut motordir1(M1_DIR); DigitalOut LED(LED_GREEN); -float PWM = 0.2; /// (1000/200); +float PWM = 0.6; /// (1000/200); //HIDScope scope(3); int main() { - //pwm_motor1.period_us(100); - //pwm_motor1.write(PWM); + pwm_motor1.period_us(100); + pwm_motor1.write(PWM); LED = 0; - motordir1 = 1; + motordir1 = 0; while(true) { //wait(3); - pwm_motor1.write(0.4); + //pwm_motor1.write(0.4); LED = 1; //wait(1); //PWM = PWM + 0.05;