form of HeloWorld_IHM04A1
Dependencies: FastPWM mbed ST_INTERFACES
Fork of HelloWorld_IHM04A1 by
Revision 8:05340e740644, committed 2017-05-24
- Comitter:
- Davidroid
- Date:
- Wed May 24 15:36:18 2017 +0000
- Parent:
- 7:20ff5668f5fe
- Child:
- 9:b7fc55bf70b2
- Commit message:
- Reformatting output messages; reducing the speed of motors.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Mar 24 13:09:02 2017 +0000
+++ b/main.cpp Wed May 24 15:36:18 2017 +0000
@@ -198,33 +198,33 @@
while (true) {
if (gStep > 0) {
- printf("run motor 0 at 20%% of the maximum speed\n");
- /* Set speed of motor 0 to 20% */
- motor->set_speed(0,20);
+ printf("Running motor 0 at 5%% of the maximum speed\r\n");
+ /* Set speed of motor 0 to 5% */
+ motor->set_speed(0,5);
/* start motor 0 */
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->set_speed(1,30);
+ printf("Running motor 1 at 10%% of the maximum speed\r\n");
+ /* Set speed of motor 1 to 10 % */
+ motor->set_speed(1,10);
/* start motor 1 */
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->set_speed(2,40);
+ printf("Running motor 2 at 15%% of the maximum speed\r\n");
+ /* Set speed of motor 2 to 15 % */
+ motor->set_speed(2,15);
/* start motor 2 */
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->set_speed(3,50);
+ printf("Running motor 3 at 20%% of the maximum speed\r\n");
+ /* Set speed of motor 3 to 20 % */
+ motor->set_speed(3,20);
/* start motor 3 */
motor->run(3, BDCMotor::FWD);
}
