Bertl

Dependencies:   HCSR mbed

Committer:
Alexander400
Date:
Thu Apr 23 12:04:34 2015 +0000
Revision:
0:ae8f51bac163
Bertl

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Alexander400 0:ae8f51bac163 1 /*! \file const.h
Alexander400 0:ae8f51bac163 2 \brief A Documented file.
Alexander400 0:ae8f51bac163 3 * name: const.h Version: 1.0
Alexander400 0:ae8f51bac163 4 * author: PE HTL BULME
Alexander400 0:ae8f51bac163 5 * email: pe@bulme.at
Alexander400 0:ae8f51bac163 6 * description:
Alexander400 0:ae8f51bac163 7 * Constants for ur_Bertl The Robot
Alexander400 0:ae8f51bac163 8 */
Alexander400 0:ae8f51bac163 9 #ifndef CONST_H
Alexander400 0:ae8f51bac163 10 #define CONST_H
Alexander400 0:ae8f51bac163 11
Alexander400 0:ae8f51bac163 12 /*! \var int SPEED
Alexander400 0:ae8f51bac163 13 \brief Bertl speed 0.2 (slow) - 1.0 (fast).
Alexander400 0:ae8f51bac163 14 \warning speed below 0.2 possible the motor won't start */
Alexander400 0:ae8f51bac163 15 const float SPEED = 0.2; /* Bertl speed 0.2 (slow) - 1.0 (fast) */
Alexander400 0:ae8f51bac163 16 /*! \var int DISTANCE
Alexander400 0:ae8f51bac163 17 \brief one wheel turn is appr. 24 ticks.
Alexander400 0:ae8f51bac163 18 \warning maybe the number has to be adjusted */
Alexander400 0:ae8f51bac163 19 const int DISTANCE = 24; /* one wheel turn is appr. 24 ticks */
Alexander400 0:ae8f51bac163 20 /*! \var int ANGLE
Alexander400 0:ae8f51bac163 21 \brief 12 is nearly 90 degree turn left.
Alexander400 0:ae8f51bac163 22 \warning maybe the number has to be adjusted */
Alexander400 0:ae8f51bac163 23 const int ANGLE = 12; /* nearly 90 degree turn left */
Alexander400 0:ae8f51bac163 24
Alexander400 0:ae8f51bac163 25 const int BTN_FLL = 0x80; // button front left outer
Alexander400 0:ae8f51bac163 26 const int BTN_FL = 0x04; // button front left
Alexander400 0:ae8f51bac163 27 const int BTN_FM = 0x01; // button front middle
Alexander400 0:ae8f51bac163 28 const int BTN_FR = 0x08; // button front right
Alexander400 0:ae8f51bac163 29 const int BTN_FRR = 0x40; // button front right outer
Alexander400 0:ae8f51bac163 30 const int BTN_BL = 0x10; // button back left
Alexander400 0:ae8f51bac163 31 const int BTN_BM = 0x02; // button back middle
Alexander400 0:ae8f51bac163 32 const int BTN_BR = 0x20; // button back right
Alexander400 0:ae8f51bac163 33
Alexander400 0:ae8f51bac163 34 const int LED_FL1 = 0x01; /**< front LED white */
Alexander400 0:ae8f51bac163 35 const int LED_FL2 = 0x02; /**< front LED yellow */
Alexander400 0:ae8f51bac163 36 const int LED_FR1 = 0x04; /**< front LED white */
Alexander400 0:ae8f51bac163 37 const int LED_FR2 = 0x08; /**< front LED yellow */
Alexander400 0:ae8f51bac163 38 const int LED_ALL_FRONT = 0x0F;
Alexander400 0:ae8f51bac163 39
Alexander400 0:ae8f51bac163 40 const int LED_BL1 = 0x20; /**< yellow LED back left outer */
Alexander400 0:ae8f51bac163 41 const int LED_BL2 = 0x10; /**< red LED back left inner */
Alexander400 0:ae8f51bac163 42 const int LED_BR1 = 0x80; /**< yellow LED back right outer */
Alexander400 0:ae8f51bac163 43 const int LED_BR2 = 0x40; /**< red LED back right inner */
Alexander400 0:ae8f51bac163 44 const int LED_ALL_BACK = 0xF0;
Alexander400 0:ae8f51bac163 45 const int LED_ALL = 0xFF;
Alexander400 0:ae8f51bac163 46
Alexander400 0:ae8f51bac163 47 const int addr = 0x40; // I2C-address PCA9555
Alexander400 0:ae8f51bac163 48 const int PERIOD = 20; // PWM period
Alexander400 0:ae8f51bac163 49 const int PULSWIDTH = 5; // PWN pulswidth
Alexander400 0:ae8f51bac163 50
Alexander400 0:ae8f51bac163 51
Alexander400 0:ae8f51bac163 52 #endif