PES 4 - Smart Medication Dispenser / PES4_ProgrammeforDesignReview2

Dependencies:   SDFileSystem mbed

Fork of PES4_Programme by PES 4 - Smart Medication Dispenser

Revision:
46:cdc24a24e4e3
Parent:
42:ba59ed6a2a06
Child:
52:701d0c2f47d7
--- a/source/main.cpp	Thu Mar 29 12:29:50 2018 +0000
+++ b/source/main.cpp	Thu Mar 29 14:14:13 2018 +0000
@@ -102,15 +102,16 @@
 
                 /* Servo-Board Test Tool */
             case 48:
-                pc.printf("Servo-Board Test Tool\n\rEnter Channel Number and then Duty Cycle\n\r");
-                pc.printf("for exit, enter Channel > 15");
+                pc.printf("\n\r\n\rServo-Board Test Tool\n\rEnter Channel Number and then Duty Cycle\n\r");
+                pc.printf("for exit, enter Channel > 15\n\r");
                 channel = 0;
                 while (channel < 16) {
                     pc.printf("Channel Number: ");
                     pc.scanf("%d", &channel);
-                    pc.printf("\r\nDuty Cycle 0..100: ");
+                    pc.printf("\r\nchannel: %d\n\rDuty Cycle 0..4095: ",channel);
                     pc.scanf("%d", &dutyCycle);
-                    setPWM((char)channel, (char)dutyCycle);
+                    pc.printf("\n\r%d\n\r",dutyCycle);
+                    setPWM((char)channel, (int)dutyCycle);
                     fflush(stdin);
                 }
                 pc.printf("leave Servo-Board Test Tool\n\r");
@@ -131,10 +132,11 @@
 
             case 51:
                 pc.printf("Init PWM\r\n");
-                initPWM(60);   
+                initPWM(50);   
                 enableOutput();  
                 state = 47;
                 break;
+                
             default:
                 state = 47; /* Go to State Switch */
                 break;