| EVShield v1.3 EVShield Library Reference by mindsensors.com

EVs_EV3Color.h
1 /*
2 * EVShield interface library
3 * Copyright (C) 2015 mindsensors.com
4 *
5 * This file is part of EVShield interface library.
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #ifndef EVs_EV3Color_H
22 #define EVs_EV3Color_H
23
24 #include "EVShieldUART.h"
25
29 typedef enum {
30 MODE_Color_ReflectedLight = 0x00,
31 MODE_Color_AmbientLight = 0x01,
32 MODE_Color_MeasureColor = 0x02,
33 } MODE_Color;
34
38 class EVs_EV3Color : public EVShieldUART
39 {
40 public:
42 bool init(EVShield * shield, SH_BankPort bp);
43
45 float getVal();
46 };
47
48 #endif
49
EVs_EV3Color
This class interfaces with LEGO EV3 Color sensor attached to EVShield.
Definition: EVs_EV3Color.h:38
EVs_EV3Color::getVal
float getVal()
Definition: EVs_EV3Color.cpp:30
EVShieldUART
EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.
Definition: EVShieldUART.h:32
EVShield
This class defines methods to access EVShield features.
Definition: EVShield.h:694
SH_BankPort
SH_BankPort
Definition: SHDefines.h:52
EVs_EV3Color::init
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_EV3Color.cpp:24