SmartVehicle-Basis
SmartFactory
HardwareConfiguration.h
Go to the documentation of this file.
1 
15 #ifndef HARDWARECONFIGURATION_H
16 #define HARDWARECONFIGURATION_H
17 
18 //Setup for Drive /////////////////
19 const double SPEEDFACTOR = 1.3;
20 const unsigned int RIGHT_MOTOR = 1;
21 const unsigned int LEFT_MOTOR = 2;
22 const unsigned int SPEED = 70 * SPEEDFACTOR;
23 const unsigned int REDUCED_SPEED = SPEED * 0.8 * SPEEDFACTOR;
24 const unsigned int TURNING_SPEED = 70 * SPEEDFACTOR;
25 // const unsigned int PUSH_SPEED = 80 * SPEEDFACTOR; ///<
26 
27 const unsigned int PIN_SENSOR_0 = 13;
28 const unsigned int PIN_SENSOR_1 = 12;
29 const unsigned int PIN_SENSOR_2 = 11;
30 const unsigned int PIN_SENSOR_3 = 10;
31 const unsigned int PIN_SENSOR_4 = 9;
32 
34 //Setup for Drive - PID /////////////////////
35 #if SPEEDFACTOR < 2
36 const double PID_KP = 10;
37 const double PID_KI = 2;
38 const double PID_KD = 0.005;
39 // const double PID_KP = 5; ///< P-value of the PID-controller
40 // const double PID_KI = 2; ///< I-value of the PID-controller
41 // const double PID_KD = 0.001; ///< D-value of the PID-controller
42 #else //use an more agressiv PID
43 const double K_P = 30;
44 const double K_I = 20;
45 const double K_D = 0.05;
46 #endif
47 
49 //Setup for sonar ///////////////////
50 #define SONAR_SERVO_PIN 5
51 #define SONAR_TRIGGER_PIN 15
52 #define SONAR_ECHO_PIN 14
53 #define SONAR_MAX_DISTANCE 9999
54 #define MIN_ERROR -5
55 #define MAX_ERROR 5
56 #define MIN_TURN_ANGLE 180
57 #define MAX_TURN_ANGLE 0
58 
60 //Setup for Hoist //////////////////
61 #define HOIST_SERVO_PIN 6
62 #define HOIST_SERVO_DELAY 30
63 #define HOIST_POSITION_MIN 160
64 #define HOIST_POISITION_MAX 65
65 
67 //Setup for Vision /////////////////
68 #define VISION_SERVO_PIN 5
69 #define VISION_DELAY_FACTOR 6
70 #define VISION_TOLERANCE_LEFT 165
71 #define VISION_TOLERANCE_RIGHT 155
72 #define VISION_START_ANGLE 90
73 
75 #endif
const unsigned int REDUCED_SPEED
Reduced operating speed.
const unsigned int PIN_SENSOR_0
Pin number of line detection sensor 0.
const unsigned int LEFT_MOTOR
Portnumber of the left motor on the motorshield.
const double PID_KI
I-value of the PID-controller.
const unsigned int SPEED
Standard operating speed.
const unsigned int PIN_SENSOR_4
Pin number of line detection sensor 4.
const double PID_KD
D-value of the PID-controller.
const unsigned int PIN_SENSOR_3
Pin number of line detection sensor 3.
const unsigned int RIGHT_MOTOR
Portnumber of the right motor on the motorshield.
const unsigned int PIN_SENSOR_1
Pin number of line detection sensor 1.
const unsigned int TURNING_SPEED
Turning speed.
const double SPEEDFACTOR
The speed factor can be used to increase or decrease the complete speed. it affects all speed setting...
const double PID_KP
P-value of the PID-controller.
const unsigned int PIN_SENSOR_2
Pin number of line detection sensor 2.