calibration code

Dependencies:   Motor mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "Motor.h"
00003 Serial pc(USBTX,USBRX);//allows communication through the USB
00004 AnalogIn range(p19);
00005 Motor m(p26, p29, p30);
00006 float rv;
00007 int main()
00008 {
00009     m.speed(0);
00010     pc.baud(9600);
00011     pc.format(7,SerialBase::None,1);
00012     while(1) {
00013         rv=range;
00014         pc.printf("%f\n",rv);
00015         
00016     }
00017 }