df

Dependencies:   mbed

Committer:
jahatch
Date:
Wed Jul 01 02:35:56 2015 +0000
Revision:
2:6f9c364ebe40
Parent:
1:6a420a141411
dfzfd

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jahatch 1:6a420a141411 1 #include "mbed.h"
jahatch 1:6a420a141411 2 #include "Encoder.h"
jahatch 0:0a457148bccf 3 int main() {
jahatch 1:6a420a141411 4 Encoder angEncoder(p5, p6, p7, p21);
jahatch 2:6f9c364ebe40 5 Serial pc(USBTX, USBRX);
jahatch 2:6f9c364ebe40 6 DigitalOut led1(LED1);
jahatch 2:6f9c364ebe40 7 led1 = 1;
jahatch 0:0a457148bccf 8
jahatch 2:6f9c364ebe40 9 //zero_ang = 1
jahatch 2:6f9c364ebe40 10 angEncoder.init(0); angEncoder.init(0);
jahatch 2:6f9c364ebe40 11 while(1){
jahatch 2:6f9c364ebe40 12 int s = angEncoder.angle();
jahatch 2:6f9c364ebe40 13 pc.printf("%f\n\r", s);
jahatch 2:6f9c364ebe40 14
jahatch 2:6f9c364ebe40 15 }
jahatch 2:6f9c364ebe40 16
jahatch 0:0a457148bccf 17 }