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

EVs_AngleSensor.h
1
2 // EVs_AngleSensor.h
3 //
4 // This is a class for reading from AngelSensor, made by Mindsensors.
5 // See http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=173
6
7 // Initial version: 2012-09-17 by Deepak Patil
8 // Modified for EVShield: 2015-02-16 Michael Giles
9
10 /*
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Lesser General Public
13 License as published by the Free Software Foundation; either
14 version 2.1 of the License, or (at your option) any later version.
15
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
20
21 You should have received a copy of the GNU Lesser General Public
22 License along with this library; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26
27 #ifndef EVs_ANGLE_SENSOR_H
28 #define EVs_ANGLE_SENSOR_H
29
30 #define AS_Command 0x41
31
32 #define ANGLE 0x42
33 #define RAW_READING 0x46
34
35 #include "EVShieldI2C.h"
36
41 class EVs_AngleSensor : public EVShieldI2C
42 {
43 public:
45 EVs_AngleSensor(uint8_t i2c_address = 0x30);
46
48 uint8_t issueCommand(char command);
49
52 long getAngle();
53
56 long getRawReading();
57
60 void reset();
61
62 };
63
64 #endif
EVs_AngleSensor::getAngle
long getAngle()
Definition: EVs_AngleSensor.cpp:36
EVs_AngleSensor::reset
void reset()
Definition: EVs_AngleSensor.cpp:47
EVs_AngleSensor::EVs_AngleSensor
EVs_AngleSensor(uint8_t i2c_address=0x30)
Definition: EVs_AngleSensor.cpp:29
EVs_AngleSensor::issueCommand
uint8_t issueCommand(char command)
EVs_AngleSensor::getRawReading
long getRawReading()
Definition: EVs_AngleSensor.cpp:41
EVs_AngleSensor
This class interfaces with sensor attached to EVShield.
Definition: EVs_AngleSensor.h:41
EVShieldI2C
This class implements I2C interfaces used by EVShield.
Definition: EVShieldI2C.h:32