-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsensors.h
34 lines (26 loc) · 1.01 KB
/
sensors.h
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
#ifndef SENSOR_INTERFACE
#define SENSOR_INTERFACE
#define WHITELINE_FRONT_LEFT_PIN A0
#define WHITELINE_FRONT_RIGHT_PIN A1
#define WHITELINE_REAR_LEFT_PIN A2
#define WHITELINE_REAR_RIGHT_PIN A3
#define KEYENCE_LEFT_PIN D9
#define KEYENCE_CENTER_PIN D10
#define KEYENCE_RIGHT_PIN D11
#define OMRON_PIN MISO // Aici cred ca trbeuie dat exact numarul pinului
#define KEYENCE_LEFT 0
#define KEYENCE_CENTER 1
#define KEYENCE_RIGHT 2
#define NUM_WHITELINE_SENSORS 4
#define WHITELINE_FRONT_LEFT 0
#define WHITELINE_FRONT_RIGHT 1
#define WHITELINE_REAR_LEFT 2
#define WHITELINE_REAR_RIGHT 3
#define WHITELINE_DISTANCE 2 // 2mm? - schimba aici daca nu e in mm
void init_keyence_array();
void init_whiteline_array(); // daca trebuie si distanta, foloseste definitia din fisierul asta
void init_omron();
int[3] get_keyence_array(); // in cazul in care trebuie trimisi si pinii ca argument, sa schimbi linistit
unsigned int[NUM_WHITELIEN_SENSORS] get_whiteline_array();
int get_omron();
#endif