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

EVs_EV3Gyro.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_EV3Gyro_H
22 #define EVs_EV3Gyro_H
23
24 #include "EVShieldUART.h"
25
29 typedef enum {
30 MODE_Gyro_Angle = 0x00,
31 MODE_Gyro_Rate = 0x01
33 } MODE_Gyro;
34
38 class EVs_EV3Gyro : public EVShieldUART
39 {
40 public:
41 bool init(EVShield * shield, SH_BankPort bp);
42
44 int getAngle();
45
47 int getRefAngle();
48
50 int setRef();
51 };
52 #endif
EVs_EV3Gyro
This class interfaces with LEGO EV3 Gyro sensor attached to EVShield.
Definition: EVs_EV3Gyro.h:38
EVShieldUART
EVShield UART Sensor class. also provides support for the EV3 Touch Sensor.
Definition: EVShieldUART.h:32
EVs_EV3Gyro::getRefAngle
int getRefAngle()
Definition: EVs_EV3Gyro.cpp:37
EVs_EV3Gyro::setRef
int setRef()
Definition: EVs_EV3Gyro.cpp:43
EVShield
This class defines methods to access EVShield features.
Definition: EVShield.h:694
SH_BankPort
SH_BankPort
Definition: SHDefines.h:52
EVs_EV3Gyro::getAngle
int getAngle()
Definition: EVs_EV3Gyro.cpp:32