![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Boleh bisa langsung dicoba, tap servo base belum dikalibrasi
Diff: main.cpp
- Revision:
- 6:38fb058f5827
- Parent:
- 5:832f5a808578
- Child:
- 7:32fab84c1877
--- a/main.cpp Sun May 12 14:18:11 2019 +0000 +++ b/main.cpp Sun May 12 16:00:19 2019 +0000 @@ -22,14 +22,16 @@ float f=0; //servo2.write(1.0); while(1){ - servo1.position((f+51)*1.10); + servo1.position((f-51)*1.14); //servo1.pulsewidth_ms(f); //pc.printf("input (1..10) bakal dijadiin persen : "); pc.printf("input (1..360) bakal dijadiin derajat : "); - pc.scanf("%f\n",&f); + pc.scanf("%f",&f); + //pc.printf("\n"); // float f = (float)n/(float)10; - pc.printf("%f\n",&f); - //pc.printf("\n"); + wait_ms(20); + pc.printf("%f\n",servo1.read()); + //pc.printf(" \n"); } }