new

Dependencies:   mbed

Revision:
3:b5c5c73c5bbf
Parent:
2:94a34bcf8f09
--- a/main.cpp	Sun Feb 22 18:05:52 2015 +0000
+++ b/main.cpp	Sun Feb 22 20:31:19 2015 +0000
@@ -125,10 +125,6 @@
                             break; 
                             }
                 }
-        
-   
-     
-            
             //Check each colum to see if it is high
             //if it is "turn on" that respective bit
              if(col1 == 1)
@@ -148,29 +144,23 @@
                     if(c != 0){
                         pc.printf("%c\r",c);  //print input and char
                     }
-                    
                     //Assign freql and freqh based on current input
                     float freqh,freql;
                     char *freq = dtmfMap[cur_input];
                     sscanf(freq,"%f,%f",&freqh,&freql);
                     pc.printf("High:%f, Low:%f\r",freqh,freql);
-                    
-              
-                    
                     //Set the low frequency on ticker
                     on = 1;
-                    PWMcont.attach(&flip, (1/(2*freql))); // the address of the function to be attached (flip) and the interval (1/freql)
+                    // the address of the function to be attached (flip) and the interval (1/freql)
+                    PWMcont.attach(&flip, (1/(2*freql))); 
                     //Set the high frequency on PWMout 
-                    PWMh.period(1/freqh);               // set PWM period to user specified for high tone
-                    PWMh=0.5;                         // set duty cycle to 50%
-                    
+                    PWMh.period(1/freqh);             // set PWM period to user specified for high tone
+                    PWMh=0.5;                         // set duty cycle to 50%    
                 }
-                 
             }
             //Turn off pulse width modulation if curr input is 0
             else {
                 PWMh = 0.0;
-                //PWMl = 0.0;
                 on = 0;
              }