NXT Touch sensor class.
More...
#include <TouchSensor.h>
List of all members.
Public Member Functions |
| TouchSensor (ePortS port) |
| Constructor.
|
bool | isPressed (void) const |
| Get touch sensor status.
|
S16 | get (void) const |
| Get raw A/D value.
|
Protected Member Functions |
ePortS | getPort (void) const |
| Get the sensor connected port.
|
Detailed Description
Constructor & Destructor Documentation
Constructor.
Note:
This class must be constructed as a global object. Otherwise, a device assertion will be displayed
in the LCD when the object is constructed as a non global object.
When the object is destructed while the system is shut down, the device is de-activated automatically.
- Parameters:
-
port | Touch sensor connected port |
- Returns:
- -
Member Function Documentation
Get raw A/D value.
- Parameters:
-
- Returns:
- raw A/D value (0 to 1023)
Get the sensor connected port.
- Parameters:
-
- Returns:
- Sensor connected port
Get touch sensor status.
- Parameters:
-
- Returns:
- true:pressed/false:not pressed
The documentation for this class was generated from the following file: