part1
Dependencies: mbed
Diff: main.cpp
- Revision:
- 3:664e38d7ae34
- Parent:
- 2:255d7e71c69b
- Child:
- 4:34df824930f6
--- a/main.cpp Fri Feb 13 17:57:57 2015 +0000 +++ b/main.cpp Tue Feb 17 18:55:46 2015 +0000 @@ -25,6 +25,11 @@ { //Input Desired Tone printf("Input Desired Tone: Frequency (Hz) Duration (ms) followed by enter\r"); + char c; + while((c = pc.getc()) != '\r') { + printf("%c",c); + c = pc.getc(); + } fgets(input, sizeof input, stdin); //input size length 9 followed by enter (xxxx xxxx/r) isint = sscanf(input, "%f %d",&freq,&dur); //assign input variables printf("isint = %d\r",isint); //debug check if input is correct