![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
tugas akhir
Dependencies: Motor mbed millis
Fork of DagonFly__RoadToJapan_15Mei_Ultimate by
Diff: main.cpp
- Revision:
- 34:1cfd9b1c7d27
- Parent:
- 33:69d266bc3fe9
- Child:
- 35:69a47b4cb3fc
--- a/main.cpp Tue Feb 14 10:34:39 2017 +0000 +++ b/main.cpp Tue Feb 14 13:56:53 2017 +0000 @@ -61,7 +61,7 @@ double last_error = 0, current_error, sum_error = 0; double last_error2 = 0, current_error2, sum_error2 = 0; float rpm, target_rpm = 8.0; -float rpm2, target_rpm2 = 8.0; +float rpm2, target_rpm2 = 10.0; float pwmPowerUp = 0.70; float pwmPowerDown = -0.80; bool henti=false, hentis=false; @@ -130,7 +130,7 @@ DigitalOut pneumatik(PB_3, PullUp); /*Dekalrasi Limit Switch */ -DigitalIn limitAtas(PC_9, PullUp); +DigitalIn infraAtas(PC_9, PullUp); DigitalIn limitTengah(PB_10, PullUp); DigitalIn limitBawah(PC_8, PullUp); @@ -339,7 +339,7 @@ { motorDpn.brake(1); motorBlk.brake(1); - if (!limitAtas) + if (!infraAtas) { powerScrew.brake(1); }