![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
02/07/15
Dependencies: mbed
Diff: UserInput.cpp
- Revision:
- 56:bf08d9e50ccc
- Parent:
- 54:9322b1b76e13
- Child:
- 59:2cbbd6fea55b
--- a/UserInput.cpp Thu Jul 16 14:42:29 2015 +0000 +++ b/UserInput.cpp Tue Jul 28 14:40:26 2015 +0000 @@ -1,11 +1,13 @@ #include "mbed.h" #include <utility> +#include <string> extern Serial pc; int sensorNumber; double sensorDistance; -int inputNoOfPins(){ +int inputNoOfPins() +{ pc.printf("Ready to Read.\n"); pc.printf("Enter the number of sensors\n"); while (1){ @@ -14,11 +16,10 @@ pc.scanf("%d", &sensorNumber); break; } - } + } pc.printf("sensorNumber : %d \t " ,sensorNumber ); return(sensorNumber); - } - + } double inputDistance(){ pc.printf("Enter the distance between each sensor\n "); while (1){