ding
Dependencies: Encoder HIDScope mbed
main.cpp
- Committer:
- wiesdat
- Date:
- 2014-10-27
- Revision:
- 1:1709bd849df0
- Parent:
- 0:7e81becf02c6
- Child:
- 2:ca2573919cb5
File content as of revision 1:1709bd849df0:
#include "mbed.h" #include "encoder.h" #include "HIDScope.h" #include <iostream> Encoder encoderA(PTD0,PTD2); PwmOut pwm(PTA5); DigitalOut dir(PTA4); HIDScope scope(5); float enca = 0, encb =0; float speed; int main(){ while(1){ cin>>speed; pwm = 0.1; enca = encoderA.getPosition(); scope.set(0,pwm); scope.set(1,enca); scope.send(); wait(0.2); } }