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

EVs_NXTColor.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_NXTColor_H
22 #define EVs_NXTColor_H
23
24 #include "SHDefines.h"
25 #include "EVShield.h"
26
30 class EVs_NXTColor
31 {
32 public:
34 EVShield * mp_shield;
35
37 SH_BankPort m_bp;
38
41 int m_offset;
42
44 EVs_NXTColor();
45
47 EVs_NXTColor(EVShield * shield, SH_BankPort bp);
48
50 bool setType(uint8_t type);
51
53 //int readRaw();
54
56 bool init(EVShield * shield, SH_BankPort bp);
57
58 uint8_t readValue();
59
60 uint8_t readColor();
61
62 };
63
64
65 #endif
66
EVs_NXTColor::setType
bool setType(uint8_t type)
Definition: EVs_NXTColor.cpp:61
EVs_NXTColor::m_offset
int m_offset
Definition: EVs_NXTColor.h:41
EVs_NXTColor::EVs_NXTColor
EVs_NXTColor()
Definition: EVs_NXTColor.cpp:21
EVs_NXTColor::init
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_NXTColor.cpp:43
EVs_NXTColor::m_bp
SH_BankPort m_bp
Definition: EVs_NXTColor.h:37
SHDefines.h
EVs_NXTColor::mp_shield
EVShield * mp_shield
Definition: EVs_NXTColor.h:34
EVShield
This class defines methods to access EVShield features.
Definition: EVShield.h:694
EVs_NXTColor
EVShield Analog Sensor class.
Definition: EVs_NXTColor.h:30
SH_BankPort
SH_BankPort
Definition: SHDefines.h:52
EVShield.h