The first code

Dependencies:   mbed Motor

main.cpp

Committer:
170198
Date:
2015-02-05
Revision:
1:a46a378d5561
Parent:
0:2f38be5ec9dc
Child:
2:559b5507c580

File content as of revision 1:a46a378d5561:

#include "mbed.h"
#include "time.h"

AnalogIn ain(p17);
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");
    }
}