
Robo l minuscolo
Dependencies: X_NUCLEO_IHM04A1 mbed
Fork of HelloWorld_IHM04A1 by
Revision 5:4c1e581bbb8b, committed 2016-06-15
- Comitter:
- brdirais
- Date:
- Wed Jun 15 12:51:03 2016 +0000
- Parent:
- 4:dae3d62ad7b4
- Child:
- 6:d5d776281222
- Commit message:
- Update of main.cpp after X_NUCLEO_IHM04A1 library update
Changed in this revision
--- a/X_NUCLEO_IHM04A1.lib Tue May 17 12:56:07 2016 +0000 +++ b/X_NUCLEO_IHM04A1.lib Wed Jun 15 12:51:03 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM04A1/#65057305b86e +https://developer.mbed.org/teams/ST/code/X_NUCLEO_IHM04A1/#b06e38d365d7
--- a/main.cpp Tue May 17 12:56:07 2016 +0000 +++ b/main.cpp Wed Jun 15 12:51:03 2016 +0000 @@ -112,7 +112,7 @@ /* Code to be customised */ /************************/ /* Get the state of bridge A */ - uint16_t bridgeState = motor->CmdGetStatus(0); + uint16_t bridgeState = motor->GetBridgeStatus(0); if (bridgeState == 0) { @@ -126,7 +126,7 @@ } /* Get the state of bridge B */ - bridgeState = motor->CmdGetStatus(1); + bridgeState = motor->GetBridgeStatus(1); if (bridgeState == 0) { @@ -212,46 +212,46 @@ { printf("Run motor 0 at 20%% of the maximum speed\n"); /* Set speed of motor 0 to 20% */ - motor->SetMaxSpeed(0,20); + motor->SetSpeed(0,20); /* start motor 0 */ - motor->Run(0, FORWARD); + motor->Run(0, BDCMotor::FWD); } if (gStep > 1) { printf("Run motor 1 at 30%% of the maximum speed\n"); /* Set speed of motor 1 to 30 % */ - motor->SetMaxSpeed(1,30); + motor->SetSpeed(1,30); /* start motor 1 */ - motor->Run(1, FORWARD); + motor->Run(1, BDCMotor::FWD); } if (gStep > 2) { printf("Run motor 2 at 40%% of the maximum speed\n"); /* Set speed of motor 2 to 40 % */ - motor->SetMaxSpeed(2,40); + motor->SetSpeed(2,40); /* start motor 2 */ - motor->Run(2, FORWARD); + motor->Run(2, BDCMotor::FWD); } if (gStep > 3) { printf("Run motor 3 at 50%% of the maximum speed\n"); /* Set speed of motor 3 to 50 % */ - motor->SetMaxSpeed(3,50); + motor->SetSpeed(3,50); /* start motor 3 */ - motor->Run(3, FORWARD); + motor->Run(3, BDCMotor::FWD); } if (gStep > 0) { wait_ms(1000); - motor->CmdHardHiZ(0); - motor->CmdHardHiZ(1); - motor->CmdHardHiZ(2); - motor->CmdHardHiZ(3); + motor->HardHiZ(0); + motor->HardHiZ(1); + motor->HardHiZ(2); + motor->HardHiZ(3); wait_ms(1000); }
--- a/mbed.bld Tue May 17 12:56:07 2016 +0000 +++ b/mbed.bld Wed Jun 15 12:51:03 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/7c328cabac7e \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file