Class Bertl
Dependencies: HCSR
Fork of ur_Bertl by
const.h
00001 /*! \file const.h 00002 \brief A Documented file. 00003 * name: const.h Version: 3.0 \n 00004 * author: PE HTL BULME \n 00005 * email: pe@bulme.at \n 00006 * description: 00007 * Constants for ur_Bertl The Robot 00008 * Constant for Robot from objectiv Robot added 00009 */ 00010 #ifndef CONST_H 00011 #define CONST_H 00012 #define TIME /**< if defined Bertl uses the time and not motor encoder*/ 00013 const int MOVE=500; /**< ms move forward or backward */ 00014 const int TURN=500; /**< ms TurnLeft or TurnRigth (nearly 90 degree) */ 00015 const int STEPTIME=20; /**< ms turn left or right for adjusting moves for TurnLeft or TurnRigth */ 00016 00017 /*! \var int ULTRASONIC_DISTANCE 00018 \brief Bertl Ultrasonic Distance Sensor from 1 to n; 5 is ok for nearly 5 cm. 00019 \warning no warning*/ 00020 const int ULTRASONIC_DISTANCE = 5; /* Distance sensor */ 00021 /*! \var int SPEED 00022 \brief Bertl speed 0.2 (slow) - 1.0 (fast). 00023 \warning speed below 0.2 possible the motor won't start */ 00024 const float SPEED = 0.4; /* Bertl speed 0.2 (slow) - 1.0 (fast) */ 00025 /*! \var int DISTANCE 00026 \brief one wheel turn is appr. 24 ticks. 00027 \warning maybe the number has to be adjusted */ 00028 const int DISTANCE = 12; /* one wheel turn is appr. 24 ticks */ 00029 /*! \var int ANGLE 00030 \brief 12 is nearly 90 degree turn left. 00031 \warning maybe the number has to be adjusted */ 00032 const int ANGLE = 12; /* nearly 90 degree turn left */ 00033 00034 const int BTN_FLL = 0x80; // button front left outer 00035 const int BTN_FL = 0x04; // button front left 00036 const int BTN_FM = 0x01; // button front middle 00037 const int BTN_FR = 0x08; // button front right 00038 const int BTN_FRR = 0x40; // button front right outer 00039 const int BTN_BL = 0x10; // button back left 00040 const int BTN_BM = 0x02; // button back middle 00041 const int BTN_BR = 0x20; // button back right 00042 00043 const int LED_FL1 = 0x01; /**< front LED white */ 00044 const int LED_FL2 = 0x02; /**< front LED yellow */ 00045 const int LED_FR1 = 0x04; /**< front LED white */ 00046 const int LED_FR2 = 0x08; /**< front LED yellow */ 00047 const int LED_ALL_FRONT = 0x0F; 00048 00049 const int LED_BL1 = 0x20; /**< yellow LED back left outer */ 00050 const int LED_BL2 = 0x10; /**< red LED back left inner */ 00051 const int LED_BR1 = 0x80; /**< yellow LED back right outer */ 00052 const int LED_BR2 = 0x40; /**< red LED back right inner */ 00053 const int LED_ALL_BACK = 0xF0; 00054 const int LED_ALL = 0xFF; 00055 00056 const int LED_BLUE = 0xBB; 00057 00058 const int addr = 0x40; // I2C-address PCA9555 00059 const int PERIOD = 20; // PWM period 00060 const int PULSWIDTH = 5; // PWN pulswidth 00061 const int East = 1; 00062 const int West = 2; 00063 const int North = 3; 00064 const int South = 4; 00065 00066 #endif
Generated on Wed Jul 20 2022 03:41:07 by 1.7.2