james hatch
/
Encoder
df
main.cpp
- Committer:
- jahatch
- Date:
- 2015-07-01
- Revision:
- 2:6f9c364ebe40
- Parent:
- 1:6a420a141411
File content as of revision 2:6f9c364ebe40:
#include "mbed.h" #include "Encoder.h" int main() { Encoder angEncoder(p5, p6, p7, p21); Serial pc(USBTX, USBRX); DigitalOut led1(LED1); led1 = 1; //zero_ang = 1 angEncoder.init(0); angEncoder.init(0); while(1){ int s = angEncoder.angle(); pc.printf("%f\n\r", s); } }