-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.c
48 lines (34 loc) · 1.21 KB
/
constants.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "constants.h"
// Ultrasonic sensors:
// 2.5 This is the common port to trigger all the sensors.
const PORT TRIG_PORT = GPIO_PORT_P2;
const PIN TRIG_PIN = GPIO_PIN5;
// 8.1, 2.7, 8.0, 5.1
const PORT U_SENSOR1_PORT = GPIO_PORT_P8;
const PIN U_SENSOR1_PIN = GPIO_PIN1;
const PORT U_SENSOR2_PORT = GPIO_PORT_P8;
const PIN U_SENSOR2_PIN = GPIO_PIN0;
const PORT U_SENSOR3_PORT = GPIO_PORT_P5;
const PIN U_SENSOR3_PIN = GPIO_PIN1;
const PORT U_SENSOR4_PORT = GPIO_PORT_P2;
const PIN U_SENSOR4_PIN = GPIO_PIN7;
// MOTOR 1
// 1.5, 1.4, 1.3, 5.3
const PORT MOTOR1_PORT1 = GPIO_PORT_P1;
const PIN MOTOR1_PIN1 = GPIO_PIN5;
const PORT MOTOR1_PORT2 = GPIO_PORT_P1;
const PIN MOTOR1_PIN2 = GPIO_PIN4;
const PORT MOTOR1_PORT3 = GPIO_PORT_P1;
const PIN MOTOR1_PIN3 = GPIO_PIN3;
const PORT MOTOR1_PORT4 = GPIO_PORT_P5;
const PIN MOTOR1_PIN4 = GPIO_PIN3;
// MOTOR 2
// 5.2, 5.0, 1.6, 1.7
const PORT MOTOR2_PORT1 = GPIO_PORT_P5;
const PIN MOTOR2_PIN1 = GPIO_PIN2;
const PORT MOTOR2_PORT2 = GPIO_PORT_P5;
const PIN MOTOR2_PIN2 = GPIO_PIN0;
const PORT MOTOR2_PORT3 = GPIO_PORT_P1;
const PIN MOTOR2_PIN3 = GPIO_PIN6;
const PORT MOTOR2_PORT4 = GPIO_PORT_P1;
const PIN MOTOR2_PIN4 = GPIO_PIN7;