NXShield  v1.07
NXShield Library Reference by OpenElectrons.com
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
NXTLight Class Reference

This class interfaces with LEGO Light sensor attached to NXShield. More...

#include <NXTLight.h>

Inheritance diagram for NXTLight:
NXShieldAGS

Public Member Functions

bool init (NXShield *shield, SH_BankPort bp)
 
bool setReflected ()
 
bool setAmbient ()
 
- Public Member Functions inherited from NXShieldAGS
 NXShieldAGS ()
 
 NXShieldAGS (NXShield *shield, SH_BankPort bp)
 
bool setType (uint8_t type)
 
int readRaw ()
 
bool init (NXShield *shield, SH_BankPort bp)
 

Additional Inherited Members

- Public Attributes inherited from NXShieldAGS
NXShieldmp_shield
 
SH_BankPort m_bp
 

Detailed Description

This class interfaces with LEGO Light sensor attached to NXShield.

Note, the light sensor does not work on BAS1.

Member Function Documentation

bool NXTLight::init ( NXShield shield,
SH_BankPort  bp 
)

initialize the NXTLight sensor with a pointer to the NXShield and the bank port it is connected to

bool NXTLight::setAmbient ( )

set the NXTLight sensor mode to ambient light mode (internal LED will be turned off)

bool NXTLight::setReflected ( )

set the NXTLight sensor mode to reflected light mode (internal LED will be turned on)


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