NXShield  v1.07
NXShield Library Reference by OpenElectrons.com
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
EV3SensorAdapter.h
1 //EV3SensorAdapter.h
2 //
3 /*
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 /*
19  * History
20  * ------------------------------------------------
21  * Author Date Comments
22  * Deepak 11/21/13 Initial Authoring.
23  */
24 
25 
26 #ifndef EV3_SENSOR_ADAPTER_H
27 #define EV3_SENSOR_ADAPTER_H
28 
29 #define ESA_Command 0x41
30 
31 #include "NXShieldI2C.h"
35 {
36 public:
38  EV3SensorAdapter(uint8_t i2c_address = 0x32);
40  uint8_t issueCommand(char command);
42  uint8_t setMode(char newMode);
45  byte getMode( );
48  int readValue();
49 
50 
51 };
52 
53 #endif
This class implements I2C interfaces used by NXShield.
Definition: NXShieldI2C.h:32
uint8_t setMode(char newMode)
Definition: EV3SensorAdapter.cpp:48
byte getMode()
Definition: EV3SensorAdapter.cpp:41
int readValue()
Definition: EV3SensorAdapter.cpp:53
EV3SensorAdapter(uint8_t i2c_address=0x32)
Definition: EV3SensorAdapter.cpp:30
This class interfaces with sensor attached to NXShield.
Definition: EV3SensorAdapter.h:34
uint8_t issueCommand(char command)
Definition: EV3SensorAdapter.cpp:36