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

Public Member Functions | List of all members
EVs_EV3Touch Class Reference

This class interfaces with LEGO EV3 Touch sensor attached to EVShield. More...

`#include <EVs_EV3Touch.h>`

Inheritance diagram for EVs_EV3Touch:

## Public Member Functions
bool | init (EVShield *shield, SH_BankPort bp)
bool | isPressed ()
int | getBumpCount ()
bool | resetBumpCount ()
Public Member Functions inherited from EVShieldUART
| EVShieldUART ()
| EVShieldUART (EVShield *shield, SH_BankPort bp)
uint8_t | getMode ()
bool | setType (uint8_t type)
bool | writeLocation (uint8_t loc, uint8_t data)
int16_t | readLocationInt (uint8_t loc)
uint8_t | readLocationByte (uint8_t loc)
bool | init (EVShield *shield, SH_BankPort bp)
uint8_t | setMode (char newMode)
uint16_t | readValue ()
bool | readAndPrint (uint8_t loc, uint8_t len)

## Additional Inherited Members
Public Attributes inherited from EVShieldUART
EVShield * | mp_shield
SH_BankPort | m_bp
int | m_offset

## Detailed Description

This class interfaces with LEGO EV3 Touch sensor attached to EVShield.

## Member Function Documentation

## § getBumpCount()

int EVs_EV3Touch::getBumpCount | ( |  | ) |

You can get bump count for EV3Touch Sensor (an incremental pressed value) this function will return the bump count since last reset. (The max value of bumpCount is 254, after that it will not increment).

Programming Tip: If you don't want to wait to see if button is pressed, use this bump count, store the old bumpCount in a variable and see if the new bumpCount is larger than the old value.

## § init()

bool EVs_EV3Touch::init | ( | EVShield * | shield,
|  | SH_BankPort | bp
| ) |  |

initialize the interface and tell the shield where the sensor is connected

## § isPressed()

bool EVs_EV3Touch::isPressed | ( |  | ) |

check if the touch sensor is pressed (or bumped)

## § resetBumpCount()

bool EVs_EV3Touch::resetBumpCount | ( |  | ) |

reset the bump count and start the incremental bumps from zero

The documentation for this class was generated from the following files:

- C:/Program Files (x86)/Arduino-1.6.12/libraries/EVShield/EVs_EV3Touch.h
- C:/Program Files (x86)/Arduino-1.6.12/libraries/EVShield/EVs_EV3Touch.cpp