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: HIDScope QEI biquadFilter mbed
Fork of NR_method by
Diff: NR_method_1.cpp
- Revision:
- 10:86c810be889a
- Parent:
- 9:4fc2659cfb26
- Child:
- 11:b1ad257e5647
- Child:
- 14:1eee224b54d8
--- a/NR_method_1.cpp Thu Nov 01 18:57:26 2018 +0000 +++ b/NR_method_1.cpp Thu Nov 01 20:05:45 2018 +0000 @@ -139,24 +139,23 @@ Led2 = 0; i = 0; Cxx =x1; + pc.printf("Moving in the x direction\n\r"); if (dir == true) { if(x1 > -46.3) { x1 = x1-4.2; - //return x1; + } else if ( x1 <= -46.3) { x1 =-17; - //return x1; + } else { } } else { if(x1 < -17) { x1 = x1+4.2; - //return x1; } else if ( x1 >= -17) { x1 = -46.3; - //return x1; } else { } } @@ -169,6 +168,7 @@ Led2 = 0; i = 0; Cyy=y1; + pc.printf("Moving in the y direction\r\n"); if(dir == true) { if(y1 < 32.4) { y1 = y1+4.2; @@ -371,6 +371,8 @@ int main() { + pc.baud(115200); + pc.printf("Hello World!\r\n"); Led = 1; Led2 = 0; M1 = 1; @@ -391,6 +393,8 @@ count3 = Enc2.getPulses(); setCalibration(); + pc.printf("Calibration is done\r\n"); + pc.printf("Please press button SW3\n\r"); Led2 = 1; button.fall(&change_wait); PMW1.period_us(60); @@ -400,8 +404,8 @@ X[1][0] = X0[1][0]; Xold[0][0] = X0[0][0]; Xold[1][0] = X0[1][0]; - //pc.baud(115200); initializeren(); + pc.printf("Initialization step done. Enjoy your game!\n\r"); x1 = Cxx; y1= Cyy; bqc.add( &bq1 ).add( &bq2 );