Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: biquadFilter mbed MODSERIAL
Diff: main.cpp
- Revision:
- 6:075b5c7c6220
- Parent:
- 5:1319d1e1a472
- Child:
- 7:9af8fe930b3c
--- a/main.cpp Thu Nov 02 14:57:25 2017 +0000 +++ b/main.cpp Thu Nov 02 17:13:34 2017 +0000 @@ -185,7 +185,7 @@ } // Initial input value for couting the X-values -int Xin=0; +int Xin=0 ; int Xin_new; float huidigetijdX; @@ -366,7 +366,7 @@ error_o = reference_o - position_o; - pc.printf("Position_o = %i reference_o=%i Error_o=%i\n\r" ,position_o,reference_o,error_o); + //pc.printf("Position_o = %i reference_o=%i Error_o=%i\n\r" ,position_o,reference_o,error_o); if (-20<error_o && error_o<20){ motorValue1 = 0; @@ -426,7 +426,7 @@ error_r = reference_r - position_r; - //pc.printf("Position_r = %i reference_r=%i Error_r=%i\n\r" ,position_r,reference_r,error_r); + pc.printf("%i; %i; %i\n\r" ,position_b,reference_b,error_b); if (-20<error_r && error_r<20){ @@ -545,13 +545,13 @@ countzb=rotzb*4200; countzr=rotzr*4200; counto=countzo+hcounto+reference_o; //+ gemaakt van een min - countb=countzb+hcountb+reference_b; - countr=countzr+hcountr+reference_r; + countb=-(reference_b-countzb-hcountb);//(countzb)+hcountb+reference_b; + countr=-(reference_r-countzr-hcountr);//(countzr)+hcountr+reference_r; pc.printf("dLod=%.2f dLbd=%.2f dLrd=%.2f\n\r",dLod,dLbd,dLrd); - pc.printf("hcounto=%.2f hcountb=%.2f hcountr=%.2f\n\r",hcounto,hcountb,hcountr); - pc.printf("o=%.2fb=%.2fr=%.2f",countzo,countzb,countzr); // hier moet komen te staan hoe het zakken gaat - pc.printf("Position_o = %i reference_o=%i Error_o=%i\n\r" ,position_o,reference_o,error_o); + //pc.printf("hcounto=%.2f hcountb=%.2f hcountr=%.2f\n\r",hcounto,hcountb,hcountr); + pc.printf("o=%.2f b=%.2f countzr=%.2f",countzo,countzb,countzr); // hier moet komen te staan hoe het zakken gaat + pc.printf("Position_r = %i;reference_r=%i Error_r=%i\n\r" ,position_o,reference_o,error_o); } }