
ETF-PAI- Kunić Edis, Nuhodžić Muris
Revision 1:888aeafa6c13, committed 2014-06-09
- Comitter:
- tim010
- Date:
- Mon Jun 09 16:07:44 2014 +0000
- Parent:
- 0:c72c81cd99ba
- Commit message:
- Kuni? Edis, Nuhod?i? Muris
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r c72c81cd99ba -r 888aeafa6c13 main.cpp --- a/main.cpp Mon Jun 09 12:32:12 2014 +0000 +++ b/main.cpp Mon Jun 09 16:07:44 2014 +0000 @@ -7,12 +7,12 @@ int step_speed = 1200 ; // set default motor speed int numstep = 512/36; // defines full turn of 360 degree -int direction = 0; //0 for right, 1 for left +int direction = 1; //0 for right, 1 for left /* distanca { 10 , 15 , 20 , 25 , 30 , 35 , 40 , 45 , 50 , 55 , 60 , 65 , 70 , 75 , 80 , 85 , 90 } naponi { 0.89 , 0.87 , 0.81 , 0.71 , 0.62 , 0.54 , 0.47 , 0.43 , 0.39 , 0.34 , 0.32 , 0.29 , 0.28 , 0.25 , 0.24 , 0.23 , 0.21 } */ int provjeri(float n){ - if(n<0.21)return 200; + if(n<0.21)return 80; if(n>0.89)return 1; if(n<=0.89 && n>0.87) return 10; if(n<=0.87 && n>0.81) return 15; @@ -29,7 +29,7 @@ if(n<=0.28 && n>0.25) return 70; if(n<=0.25 && n>0.24) return 75; if(n<=0.24 && n>0.23) return 80; - if(n<=0.23 && n>0.21) return 85; + if(n<=0.23 && n>0.21) return 80; } int main() { float a;