The first code

Dependencies:   mbed Motor

Revision:
1:a46a378d5561
Parent:
0:2f38be5ec9dc
Child:
2:559b5507c580
--- a/main.cpp	Thu Jan 29 15:25:45 2015 +0000
+++ b/main.cpp	Thu Feb 05 15:14:35 2015 +0000
@@ -1,9 +1,20 @@
 #include "mbed.h"
+#include "time.h"
 
 AnalogIn ain(p17);
-
-
-int main() {
-
-    printf("%f \n \r",ain.read()); //this prints the voltage 
+Serial pc(USBTX, USBRX);
+Timer t;
+a={ain
+int main(void) 
+{
+    t.reset();  //reset timer to zero
+    t.start();  //start timer data timestamp
+    while(1)
+    {
+    pc.baud(9600);
+    pc.format(7,SerialBase::None,1);
+    pc.printf("%f",ain.read()); //this prints the voltage 
+    pc.printf("%f,",t.read()); 
+    pc.printf("\n");
+    }
 }