Bau
Fork of Bertl by
Revision 18:1598fdb97db1, committed 2015-12-21
- Comitter:
- Rechar
- Date:
- Mon Dec 21 14:29:45 2015 +0000
- Parent:
- 17:308802267a62
- Commit message:
- T
Changed in this revision
const.h | Show annotated file Show diff for this revision Revisions of this file |
ur_Bertl.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 308802267a62 -r 1598fdb97db1 const.h --- a/const.h Thu Nov 12 19:05:56 2015 +0000 +++ b/const.h Mon Dec 21 14:29:45 2015 +0000 @@ -11,7 +11,7 @@ #define CONST_H #define TIME /**< if defined Bertl uses the time and not motor encoder*/ const int MOVE=500; /**< ms move forward or backward */ -const int TURN=500; /**< ms TurnLeft or TurnRigth (nearly 90 degree) */ +const int TURN=310; /**< ms TurnLeft or TurnRigth (nearly 90 degree) */ const int STEPTIME=20; /**< ms turn left or right for adjusting moves for TurnLeft or TurnRigth */ /*! \var int ULTRASONIC_DISTANCE @@ -21,7 +21,8 @@ /*! \var int SPEED \brief Bertl speed 0.2 (slow) - 1.0 (fast). \warning speed below 0.2 possible the motor won't start */ -const float SPEED = 0.4; /* Bertl speed 0.2 (slow) - 1.0 (fast) */ +const float SPEED = 0.3; /* Bertl speed 0.2 (slow) - 1.0 (fast) */ +const float OFFSET = 0.6; /*! \var int DISTANCE \brief one wheel turn is appr. 24 ticks. \warning maybe the number has to be adjusted */
diff -r 308802267a62 -r 1598fdb97db1 ur_Bertl.cpp --- a/ur_Bertl.cpp Thu Nov 12 19:05:56 2015 +0000 +++ b/ur_Bertl.cpp Mon Dec 21 14:29:45 2015 +0000 @@ -39,7 +39,8 @@ char init2[2] = {0x7, 0xff}; i2c.write(0x40, init1, 2); i2c.write(0x40, init2, 2); - mg1 = mg2 = SPEED; + mg1 = SPEED; + mg2 = SPEED * OFFSET; _interrupt.rise(this, &ur_Bertl::increment); // attach increment function of this counter instance ie. motor sensor _count = 0; beepersInBag = 0;