ew
Dependencies: Nucleo_Hello_Encoder mbed
Diff: main.cpp
- Revision:
- 1:026846d05bb7
- Parent:
- 0:1c8034b7f565
diff -r 1c8034b7f565 -r 026846d05bb7 main.cpp --- a/main.cpp Thu Sep 01 06:38:13 2016 +0000 +++ b/main.cpp Thu Sep 01 08:41:49 2016 +0000 @@ -16,6 +16,8 @@ int main() { + initmotor(); + right_v = 1; TIM_Encoder_InitTypeDef encoder1, encoder2; @@ -48,7 +50,7 @@ count2=__HAL_TIM_GET_COUNTER(&timer2); dir2 = __HAL_TIM_IS_TIM_COUNTING_DOWN(&timer2); - move(10,10); + move(15,15); pc.printf("%d%s %d%s %d%s %d%s\r\n", count1, dir1==0 ? "+":"-", count2, dir2==0 ? "+":"-"); wait(0.5);