Eindversie. LU: 07-11-13.

Dependencies:   MODSERIAL mbed Encoder

Files at this revision

API Documentation at this revision

Comitter:
Socrates
Date:
Mon Oct 21 13:52:39 2013 +0000
Parent:
9:006f34c9f750
Child:
11:28a196a3d898
Commit message:
4Filters, ietwat opgeschoond;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Oct 21 11:48:58 2013 +0000
+++ b/main.cpp	Mon Oct 21 13:52:39 2013 +0000
@@ -5,8 +5,9 @@
 //Rechts is x, links is y
 AnalogIn emgtl(PTB1);
 AnalogIn emgbl(PTB0);
-PwmOut pwm_x(PTA5);
-PwmOut pwm_y(PTA12);
+//PwmOut pwm_x(PTA5);
+//PwmOut pwm_y(PTA12);
+AnalogOut pwm_x(PTE30);
 MODSERIAL pc(USBTX,USBRX);
 
 volatile bool looptimerflag;
@@ -51,10 +52,6 @@
 
     while(1) {
         while(looptimerflag != true);
-        {
-        pwm_x.write(abs(zx));
-        //pwm_y.write(abs(zy));
-        }
         looptimerflag = false;
 
 ktr=emgtr.read();
@@ -115,8 +112,8 @@
         zy=0;
         }
         
-        pwm_x.write(abs(zx));
+        //pwm_x.write(abs(zx));
         //pwm_y.write(abs(zy));
-        pc.printf("%f\n\r",zx);
+        pc.printf("%f\n\r",kbr);
     }
 }
\ No newline at end of file