Elevator
/
Elevator
The first code
main.cpp
- Committer:
- 170198
- Date:
- 2015-02-05
- Revision:
- 2:559b5507c580
- Parent:
- 1:a46a378d5561
- Child:
- 3:7b0316e7cabc
File content as of revision 2:559b5507c580:
#include "mbed.h" #include "time.h" AnalogIn ain(p17); Serial pc(USBTX, USBRX); Timer t; 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"); } }