robot.h
Go to the documentation of this file.
1 #ifndef ROBOT_H_
2 #define ROBOT_H_
3 
5 #define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt)))
6 #define bitRead(value, bit) (((value) >> (bit)) & 0x01)
7 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
8 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
9 
11 #define PI 3.1415926535897932384626433832795
12 #define TWO_PI 6.283185307179586476925286766559
13 #define DEG_TO_RAD 0.0174532925199
14 #define RAD_TO_DEG 57.295779513
15 
17 #define SAMPLE_RATE_HZ 40
18 #define DT 0.025
19 
21 #define GEARBOX 50.00
22 #define ENCODER_RES 12.00
23 #define WHEEL_DIAMETER_M 0.029
24 #define WHEEL_RADIUS_M 0.0145
25 #define TRACK_WIDTH_M 0.085
26 #define TRACK_WIDTH_HALF_M 0.0425
27 #define LINE_SENSOR_SPACING_M 0.008
28 #define LINE_SENSOR_POSITION_M 0.077
29 
31 #define MOTOR_CHANNEL_L 1
32 #define MOTOR_CHANNEL_R 2
33 #define MOTOR_POLARITY_L -1
34 #define MOTOR_POLARITY_R 1
35 #define ENCODER_CHANNEL_L 1
36 #define ENCODER_CHANNEL_R 2
37 #define ENCODER_POLARITY_L 1
38 #define ENCODER_POLARITY_R -1
39 #define S0 1, 25
40 #define S1 1, 17
41 #define S2 3, 20
42 #define LINE_LED 3, 2
43 
44 #endif


rosinljubljana
Author(s): Igor Banfi
autogenerated on Mon Feb 24 2020 12:32:36