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

EVs_EV3Infrared.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_EV3Infrared_H
22 #define EVs_EV3Infrared_H
23
24 #include "EVShieldUART.h"
25
29 typedef enum {
30 MODE_Infrared_Proximity = 0x00,
31 MODE_Infrared_Beacon = 0x01,
32 MODE_Infrared_Remote = 0x02
34 } MODE_Infrared;
35
39 class EVs_EV3Infrared : public EVShieldUART
40 {
41 public:
43 bool init(EVShield * shield, SH_BankPort bp);
44
45
47 uint16_t readProximity();
48
50 int8_t readChannelHeading(uint8_t channel);
51
53 uint8_t readChannelProximity(uint8_t channel);
54
56 uint8_t readChannelButton(uint8_t channel);
57 };
58
59 #endif
60
EVs_EV3Infrared::readChannelButton
uint8_t readChannelButton(uint8_t channel)
Definition: EVs_EV3Infrared.cpp:47
EVs_EV3Infrared::readProximity
uint16_t readProximity()
Definition: EVs_EV3Infrared.cpp:30
EVs_EV3Infrared::readChannelHeading
int8_t readChannelHeading(uint8_t channel)
Definition: EVs_EV3Infrared.cpp:35
EVShieldUART
EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.
Definition: EVShieldUART.h:32
EVs_EV3Infrared::readChannelProximity
uint8_t readChannelProximity(uint8_t channel)
Definition: EVs_EV3Infrared.cpp:41
EVs_EV3Infrared
This class interfaces with LEGO EV3 IR sensor attached to EVShield.
Definition: EVs_EV3Infrared.h:39
EVShield
This class defines methods to access EVShield features.
Definition: EVShield.h:694
EVs_EV3Infrared::init
bool init(EVShield *shield, SH_BankPort bp)
Definition: EVs_EV3Infrared.cpp:24
SH_BankPort
SH_BankPort
Definition: SHDefines.h:52