NXShield  v1.07
NXShield Library Reference by OpenElectrons.com
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
EV3Color.h
1 //EV3SensorAdapter.h
2 //
3 /*
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 /*
19  * History
20  * ------------------------------------------------
21  * Author Date Comments
22  * Deepak 11/21/13 Initial Authoring.
23  * M. Giles 01/28/14 Added I2C address and fully tested
24  */
25 
26 
27 #ifndef EV3_COLOR_H
28 #define EV3_COLOR_H
29 
30 #define ESA_Command 0x41
31 
32 #include "NXShieldI2C.h"
33 #include "EV3SensorAdapter.h"
34 
38 typedef enum {
39  MODE_Color_ReflectedLight = 0x00,
40  MODE_Color_AmbientLight = 0x01,
41  MODE_Color_MeasureColor = 0x02,
42 } MODE_Color;
45 class EV3Color : public EV3SensorAdapter
46 {
47 public:
48 
49  EV3Color(uint8_t i2c_address = 0x32);
51  uint8_t setMode(MODE_Color);
54 };
55 
56 #endif
uint8_t setMode(MODE_Color)
Definition: EV3Color.cpp:34
This class interfaces with sensor attached to NXShield.
Definition: EV3SensorAdapter.h:34
This class implements EV3 Color Sensor using EV3SensorAdapter.
Definition: EV3Color.h:45