motorCD
Dependencies: mbed nhk_2021motorCD ros_lib_melodic
Diff: main.cpp
- Revision:
- 2:342661f2a3f8
- Parent:
- 1:c79ecadc3b18
--- a/main.cpp Sat May 15 08:38:19 2021 +0000 +++ b/main.cpp Fri Aug 06 09:01:16 2021 +0000 @@ -9,7 +9,6 @@ SpeedControl motorC(p16,p15,NC,360,0.05,p25,p26); SpeedControl motorD(p11,p12,NC,360,0.05,p21,p23); - DigitalOut led(LED1); Ticker ticker; @@ -26,6 +25,7 @@ void calOmega(){ motorC.CalOmega(); motorD.CalOmega(); + //printf("C=%d, D=%d\n", motorC.getCount(), motorD.getCount()); } ros::NodeHandle nh; @@ -132,6 +132,7 @@ ticker2.attach(&spin,0.01); while(1) { + //printf("count=%d", motorC.getCount()); if(vC)motorC.Sc(vC); else motorC.stop(); if(vD)motorD.Sc(vD);