Functional test program for MAXREFDES89# that ramps each motor driver output up/down and in each direction sequentially. Uses default configuration, i.e. pwm signals are on D4, D5, D9 and D10 along with default I2C addresses for supporting I.C.s.
Dependencies: MAX14871_Shield mbed
Revision 1:c9cf8a2fc829, committed 2015-12-23
- Comitter:
- j3
- Date:
- Wed Dec 23 19:04:16 2015 +0000
- Parent:
- 0:81e41ea3f51a
- Child:
- 2:be568cc42d4b
- Commit message:
- Functional test program that sequentially ramps up/down each motor driver output in each direction. Uses default configuration, i.e. PWM signals are on D4, D5, D9 and D10 along with default I2C addresses for supporting ICs.
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 |
--- a/main.cpp Fri Aug 28 19:38:19 2015 +0000
+++ b/main.cpp Wed Dec 23 19:04:16 2015 +0000
@@ -64,7 +64,7 @@
//Ramp up
printf("Ramping up Forward, MD = %d\n", MD_ARRAY[idx]);
- for(pwm_duty_cycle = 0.0; pwm_duty_cycle < 1.0f; pwm_duty_cycle += 0.1f)
+ for(pwm_duty_cycle = 0.0f; pwm_duty_cycle < 1.0f; pwm_duty_cycle += 0.1f)
{
printf("Duty Cycle = %0.2f\n", pwm_duty_cycle);
shld.set_pwm_duty_cycle(MD_ARRAY[idx], pwm_duty_cycle);
@@ -78,7 +78,7 @@
//Ramp down
printf("Ramping down Forward, MD = %d\n", MD_ARRAY[idx]);
- for(pwm_duty_cycle = 1.0; pwm_duty_cycle > 0.0f; pwm_duty_cycle -= 0.1f)
+ for(pwm_duty_cycle = 1.0f; pwm_duty_cycle > 0.0f; pwm_duty_cycle -= 0.1f)
{
printf("Duty Cycle = %0.2f\n", pwm_duty_cycle);
shld.set_pwm_duty_cycle(MD_ARRAY[idx], pwm_duty_cycle);
@@ -94,7 +94,7 @@
//Ramp up
printf("Ramping up Reverse, MD = %d\n", MD_ARRAY[idx]);
- for(pwm_duty_cycle = 0.0; pwm_duty_cycle < 1.0f; pwm_duty_cycle += 0.1f)
+ for(pwm_duty_cycle = 0.0f; pwm_duty_cycle < 1.0f; pwm_duty_cycle += 0.1f)
{
printf("Duty Cycle = %0.2f\n", pwm_duty_cycle);
shld.set_pwm_duty_cycle(MD_ARRAY[idx], pwm_duty_cycle);
--- a/mbed.bld Fri Aug 28 19:38:19 2015 +0000 +++ b/mbed.bld Wed Dec 23 19:04:16 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/8ed44a420e5c \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c \ No newline at end of file