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

Public Member Functions | Public Attributes | List of all members
EVs_NXTColor Class Reference

EVShield Analog Sensor class. More...

`#include <EVs_NXTColor.h>`

## Public Member Functions
| EVs_NXTColor ()
| EVs_NXTColor (EVShield *shield, SH_BankPort bp)
bool | setType (uint8_t type)
bool | init (EVShield *shield, SH_BankPort bp)
uint8_t | readValue ()
uint8_t | readColor ()

## Public Attributes
EVShield * | mp_shield
SH_BankPort | m_bp
int | m_offset

## Detailed Description

EVShield Analog Sensor class.

## Constructor & Destructor Documentation

## § EVs_NXTColor() [1/2]

EVs_NXTColor::EVs_NXTColor | ( |  | ) |

null constructor for the class; need to init later

## § EVs_NXTColor() [2/2]

EVs_NXTColor::EVs_NXTColor | ( | EVShield * | shield,
|  | SH_BankPort | bp
| ) |  |

class constructor with pointer to EVShield and the bankport as a parameter; if object is instantiated using this constructor, init is not needed

## Member Function Documentation

## § init()

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

read the raw analog value from the device and return as an integer initialize the analog device with a pointer to the EVShield and the bank port it is connected to

## § setType()

bool EVs_NXTColor::setType | ( | uint8_t | type | ) |

set the type of the device on this port of the EVShield

## Member Data Documentation

## § m_bp

SH_BankPort EVs_NXTColor::m_bp

bank port the device is connected to

## § m_offset

int EVs_NXTColor::m_offset

the data for uart sensors is stored in the bank, and there is a offset based on port

## § mp_shield

EVShield* EVs_NXTColor::mp_shield

pointer to the EVShield class instantiation used

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

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