this is disco time
Dependencies: DigitDisplay Motor PID Ping mbed millis
Fork of DagonFly__RoadToJapan_17Mei by
Revision 53:9f8af4534481, committed 2017-06-07
- Comitter:
- Najib_irvani
- Date:
- Wed Jun 07 10:23:30 2017 +0000
- Parent:
- 52:876ff6bdff3c
- Commit message:
- this is disco time
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 876ff6bdff3c -r 9f8af4534481 main.cpp --- a/main.cpp Wed May 17 08:19:36 2017 +0000 +++ b/main.cpp Wed Jun 07 10:23:30 2017 +0000 @@ -131,40 +131,52 @@ //void speedKalibrasiMotor(); // Pertambahan target RPM motor atas melalui joystick /* Inisialisasi Pin TX-RX Joystik dan PC */ -joysticknucleo joystick(PA_0,PA_1); -Serial pc(USBTX,USBRX); +joysticknucleo joystick(PA_9,PA_10); //v +Serial pc(PA_2,PA_3); //v /* Deklarasi Encoder Launcher */ -encoderKRAI encLauncherDpn( PC_10, PC_11, 28, encoderKRAI::X4_ENCODING); -encoderKRAI encLauncherBlk( PC_12, PD_2, 28, encoderKRAI::X4_ENCODING); +encoderKRAI encLauncherDpn( PA_8, PC_9, 28, encoderKRAI::X4_ENCODING); //v +encoderKRAI encLauncherBlk( PC_14, PC_13, 28, encoderKRAI::X4_ENCODING); //v + +// encoder base +encoderKRAI encBaseR( PC_15, PF_0, 28, encoderKRAI::X4_ENCODING); //v +encoderKRAI encBaseL( PF_1, PF_2, 28, encoderKRAI::X4_ENCODING); //v +encoderKRAI encBaseDpn( PF_5, PF_6, 28, encoderKRAI::X4_ENCODING); //v +encoderKRAI encBaseBlk( PF_3, PF_4, 28, encoderKRAI::X4_ENCODING); //v + +// encoder elevator +encoderKRAI encElevator( PD_7, PG_10, 28, encoderKRAI::X4_ENCODING); //v /* Deklarasi Motor Base */ -Motor motorDpn(PB_7, PC_3, PC_0); //(PB_9, PA_12, PC_5); -//Motor motorBlk(PB_6, PC_14, PC_13); //(PB_6, PB_1, PB_12); (PC_7, PC_14, PC_13); -Motor motorBlk(PB_2, PB_15, PB_1); -Motor motorL (PB_9, PA_12, PA_6); -Motor motorR (PB_8, PC_6, PC_5); //(PC_6, PB_4, PB_5); +Motor motorDpn(PB_3, PC_2, PC_3); //v +Motor motorBlk(PA_5, PC_1, PC_0); //v +Motor motorL (PB_11, PE_7, PE_8);//v +Motor motorR (PB_10, PG_0, PF_15); //v /* Deklarasi Motor Launcher */ -Motor launcherDpn(PA_5,PA_11,PB_12); // pwm ,fwd, rev -Motor launcherBlk(PB_3, PC_4, PA_10); // pwm, fwd, rev -Motor powerScrew(PB_10, PB_14, PB_13); // pwm, fwd, rev +Motor launcherDpn(PA_7,PB_2,PC_5); //v +Motor launcherBlk(PA_6, PC_4, PA_4); // v +Motor powerScrew(PB_1, PF_13, PF_12); //v + +Motor Reloader(PD_12, PG_1, PE_9); // v +Motor Elevator(PB_0, PF_14, PF_11); //v /* Deklarasi Penumatik Launcher */ -DigitalOut pneumatik(PA_4, PullUp); -DigitalOut pneu_paku(PC_2, PullUp); +DigitalOut pneumatik(PA_15, PullUp); //v +DigitalOut pneu_paku(PC_10, PullUp); //v /*Dekalrasi Limit Switch */ -//DigitalIn infraAtas(PC_9, PullUp); -DigitalIn limitTengah(PA_9, PullUp); -DigitalIn limitBawah(PC_7, PullUp); -DigitalIn limitBawah1(PA_7, PullUp); +DigitalIn limitTengah(PD_5, PullUp); //v +DigitalIn limitBawah(PD_4, PullUp); //v +DigitalIn limitBawah1(PD_3, PullUp); //v +DigitalIn limitAtas1(PD_2, PullUp); //v tambahan + /*deklarasi PING ultrasonic*/ -Ping pingAtas(PC_15); +Ping pingAtas(PC_11); //v /*Deklarasi Display*/ -DigitDisplay display (PA_8, PC_8); +DigitDisplay display (PB_6, PB_5); //v /****************************************************/ /* Deklarasi Fungsi dan Procedure */
diff -r 876ff6bdff3c -r 9f8af4534481 mbed.bld --- a/mbed.bld Wed May 17 08:19:36 2017 +0000 +++ b/mbed.bld Wed Jun 07 10:23:30 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/e1686b8d5b90 \ No newline at end of file +https://mbed.org/users/mbed_official/code/mbed/builds/86740a56073b \ No newline at end of file