BertlPractise
Fork of Bertl by
const.h@18:691491518d5e, 2015-12-21 (annotated)
- Committer:
- richardkraus
- Date:
- Mon Dec 21 14:31:22 2015 +0000
- Revision:
- 18:691491518d5e
- Parent:
- 17:308802267a62
Bertl pracitse
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bulmecisco | 0:66e9a0afcbd6 | 1 | /*! \file const.h |
bulmecisco | 0:66e9a0afcbd6 | 2 | \brief A Documented file. |
bulmecisco | 13:3ce84646fd74 | 3 | * name: const.h Version: 3.0 \n |
bulmecisco | 4:76acfddc26fb | 4 | * author: PE HTL BULME \n |
bulmecisco | 4:76acfddc26fb | 5 | * email: pe@bulme.at \n |
bulmecisco | 0:66e9a0afcbd6 | 6 | * description: |
bulmecisco | 8:07e55b300ff1 | 7 | * Constants for ur_Bertl The Robot |
bulmecisco | 8:07e55b300ff1 | 8 | * Constant for Robot from objectiv Robot added |
bulmecisco | 0:66e9a0afcbd6 | 9 | */ |
bulmecisco | 0:66e9a0afcbd6 | 10 | #ifndef CONST_H |
bulmecisco | 0:66e9a0afcbd6 | 11 | #define CONST_H |
bulmecisco | 12:cedc088eaf05 | 12 | #define TIME /**< if defined Bertl uses the time and not motor encoder*/ |
bulmecisco | 12:cedc088eaf05 | 13 | const int MOVE=500; /**< ms move forward or backward */ |
richardkraus | 18:691491518d5e | 14 | const int TURN=280; |
richardkraus | 18:691491518d5e | 15 | ; /**< ms TurnLeft or TurnRigth (nearly 90 degree) */ |
bulmecisco | 12:cedc088eaf05 | 16 | const int STEPTIME=20; /**< ms turn left or right for adjusting moves for TurnLeft or TurnRigth */ |
bulmecisco | 0:66e9a0afcbd6 | 17 | |
bulmecisco | 6:df6830254e8b | 18 | /*! \var int ULTRASONIC_DISTANCE |
bulmecisco | 6:df6830254e8b | 19 | \brief Bertl Ultrasonic Distance Sensor from 1 to n; 5 is ok for nearly 5 cm. |
bulmecisco | 6:df6830254e8b | 20 | \warning no warning*/ |
bulmecisco | 6:df6830254e8b | 21 | const int ULTRASONIC_DISTANCE = 5; /* Distance sensor */ |
bulmecisco | 0:66e9a0afcbd6 | 22 | /*! \var int SPEED |
bulmecisco | 0:66e9a0afcbd6 | 23 | \brief Bertl speed 0.2 (slow) - 1.0 (fast). |
bulmecisco | 0:66e9a0afcbd6 | 24 | \warning speed below 0.2 possible the motor won't start */ |
bulmecisco | 15:43d6a7e6e64a | 25 | const float SPEED = 0.4; /* Bertl speed 0.2 (slow) - 1.0 (fast) */ |
bulmecisco | 0:66e9a0afcbd6 | 26 | /*! \var int DISTANCE |
bulmecisco | 0:66e9a0afcbd6 | 27 | \brief one wheel turn is appr. 24 ticks. |
bulmecisco | 0:66e9a0afcbd6 | 28 | \warning maybe the number has to be adjusted */ |
bulmecisco | 4:76acfddc26fb | 29 | const int DISTANCE = 12; /* one wheel turn is appr. 24 ticks */ |
bulmecisco | 0:66e9a0afcbd6 | 30 | /*! \var int ANGLE |
bulmecisco | 0:66e9a0afcbd6 | 31 | \brief 12 is nearly 90 degree turn left. |
bulmecisco | 0:66e9a0afcbd6 | 32 | \warning maybe the number has to be adjusted */ |
richardkraus | 18:691491518d5e | 33 | const int ANGLE = 9.5; /* nearly 90 degree turn left */ |
bulmecisco | 0:66e9a0afcbd6 | 34 | |
fpucher | 17:308802267a62 | 35 | const int BTN_FLL = 0x80; /**< button front left outer */ |
fpucher | 17:308802267a62 | 36 | const int BTN_FL = 0x04; /**< button front left */ |
fpucher | 17:308802267a62 | 37 | const int BTN_FM = 0x01; /**< button front middle*/ |
fpucher | 17:308802267a62 | 38 | const int BTN_FR = 0x08; /**< button front right */ |
fpucher | 17:308802267a62 | 39 | const int BTN_FRR = 0x40; /**< button front right outer*/ |
fpucher | 17:308802267a62 | 40 | const int BTN_BL = 0x10; /**< button back left*/ |
fpucher | 17:308802267a62 | 41 | const int BTN_BM = 0x02; /**< button back middle*/ |
fpucher | 17:308802267a62 | 42 | const int BTN_BR = 0x20; /**< button back right*/ |
bulmecisco | 0:66e9a0afcbd6 | 43 | |
bulmecisco | 0:66e9a0afcbd6 | 44 | const int LED_FL1 = 0x01; /**< front LED white */ |
bulmecisco | 0:66e9a0afcbd6 | 45 | const int LED_FL2 = 0x02; /**< front LED yellow */ |
bulmecisco | 0:66e9a0afcbd6 | 46 | const int LED_FR1 = 0x04; /**< front LED white */ |
bulmecisco | 0:66e9a0afcbd6 | 47 | const int LED_FR2 = 0x08; /**< front LED yellow */ |
bulmecisco | 0:66e9a0afcbd6 | 48 | const int LED_ALL_FRONT = 0x0F; |
bulmecisco | 0:66e9a0afcbd6 | 49 | |
bulmecisco | 0:66e9a0afcbd6 | 50 | const int LED_BL1 = 0x20; /**< yellow LED back left outer */ |
bulmecisco | 0:66e9a0afcbd6 | 51 | const int LED_BL2 = 0x10; /**< red LED back left inner */ |
bulmecisco | 0:66e9a0afcbd6 | 52 | const int LED_BR1 = 0x80; /**< yellow LED back right outer */ |
bulmecisco | 0:66e9a0afcbd6 | 53 | const int LED_BR2 = 0x40; /**< red LED back right inner */ |
bulmecisco | 0:66e9a0afcbd6 | 54 | const int LED_ALL_BACK = 0xF0; |
bulmecisco | 0:66e9a0afcbd6 | 55 | const int LED_ALL = 0xFF; |
bulmecisco | 0:66e9a0afcbd6 | 56 | |
bulmecisco | 1:fafbac0ba96d | 57 | const int LED_BLUE = 0xBB; |
bulmecisco | 1:fafbac0ba96d | 58 | |
bulmecisco | 0:66e9a0afcbd6 | 59 | const int addr = 0x40; // I2C-address PCA9555 |
bulmecisco | 0:66e9a0afcbd6 | 60 | const int PERIOD = 20; // PWM period |
bulmecisco | 0:66e9a0afcbd6 | 61 | const int PULSWIDTH = 5; // PWN pulswidth |
bulmecisco | 8:07e55b300ff1 | 62 | const int East = 1; |
bulmecisco | 8:07e55b300ff1 | 63 | const int West = 2; |
bulmecisco | 8:07e55b300ff1 | 64 | const int North = 3; |
bulmecisco | 8:07e55b300ff1 | 65 | const int South = 4; |
bulmecisco | 15:43d6a7e6e64a | 66 | |
bulmecisco | 0:66e9a0afcbd6 | 67 | #endif |