C4EV3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
ev3_ir.h
Go to the documentation of this file.
1 #ifndef EV3_API_EV3_IR_H
2 #define EV3_API_EV3_IR_H
3 
4 #include "ev3_sensors.h"
5 
6 #define EV3_IR_CHANNELS 4
7 
8 #define EV3_IR_SENSOR_PROXIMITY_MODE 0
9 #define EV3_IR_SENSOR_SEEK_MODE 1
10 #define EV3_IR_SENSOR_REMOTE_MODE 2
11 
12 
13 #define BEACON_CH_1 0
14 #define BEACON_CH_2 1
15 #define BEACON_CH_3 2
16 #define BEACON_CH_4 3
17 
18 // Infrared Beacon Buttons
19 #define BEACON_OFF 0
20 #define BEACON_UP_LEFT 1
21 #define BEACON_DOWN_LEFT 2
22 #define BEACON_UP_RIGHT 3
23 #define BEACON_DOWN_RIGHT 4
24 #define BEACON_UP 5
25 #define BEACON_DIAG_UP_LEFT 6
26 #define BEACON_DIAG_UP_RIGHT 7
27 #define BEACON_DOWN 8
28 #define BEACON_ON 9
29 #define BEACON_LEFT 10
30 #define BEACON_RIGHT 11
31 
32 extern SensorHandler * EV3Ir;
33 
34 typedef struct EV3IrSeekResult {
38 
39 
41 
42 int ReadEV3IrSensorProximity (int port);
43 
44 int ReadEV3IrSensorRemote (int port, int channel);
45 
46 
47 #endif //EV3_API_EV3_IR_H
struct EV3IrSeekResult EV3IrSeekResult
int distances[EV3_IR_CHANNELS]
Definition: ev3_ir.h:36
int ReadEV3IrSensorRemote(int port, int channel)
int ReadEV3IrSensorProximity(int port)
int directions[EV3_IR_CHANNELS]
Definition: ev3_ir.h:35
EV3IrSeekResult ReadEV3IrSensorSeek(int port)
Definition: ev3_ir.h:34
Imports all the c4ev3 supported sensors.
Definition: ev3_sensors.h:15
SensorHandler * EV3Ir
#define EV3_IR_CHANNELS
Definition: ev3_ir.h:6