ayio bukkka insadinsaofno
Dependencies: encoderKRAI mbed Motor_new
OE tadi udah di commit
Diff: main.cpp
- Revision:
- 3:3ee76478b110
- Parent:
- 2:710b092cfcc0
- Child:
- 4:8a50d972066d
--- a/main.cpp Tue May 14 06:32:05 2019 +0000 +++ b/main.cpp Tue May 14 06:37:33 2019 +0000 @@ -70,15 +70,15 @@ state = 0 ; pneu = 1; // menembakkan bola count_ball++; - t1 = clock_s(); + t1 = us_ticker_read(); // menggerakkan motor - if (count_ball = 2) moveMotor(60); - else if (count_ball = 4) moveMotor(90); + if (count_ball == 2) MoveMotor(60); + else if (count_ball == 4) MoveMotor(90); } else { pneu = 0; - if (milis()-t1 >1000 ) state = 1; // tunggu pneumatik kembali + if (us_ticker_read()-t1 >1000 ) state = 1; // tunggu pneumatik kembali } } }