Overview   Project   Class   Tree   Index 
NXT C++ Bluetooth Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

NXT C++ Bluetooth Library
Class Light

Sensor
   |
   +--Light

   in light.h

class Light
extends Sensor

Class for NXT light sensor


 
Fields inherited from class Sensor
has_init, connection, sensor_type, sensor_mode, sensor_port, raw_AD_value, normalized_AD_value, scaled_value, calibrated_value
 
Constructor Summary
Light( Sensor_port port, Connection* connection, Led_mode led = LED_ON )
          Constructor for the light sensor (percent mode and LED on is default)
~Light()
          
 
Method Summary
 void set( unsigned int value )
          Turn the LED on or off
   
Methods inherited from class Sensor
init, read, read, print, set, get_port, get_mode, set_type_and_mode, get_sensor_value, read_mode, read_raw, read_normalized, get_type, reset, get_i2c_address
 

Constructor Detail

Light

public Light( Sensor_port port, Connection* connection, Led_mode led = LED_ON );
Constructor for the light sensor (percent mode and LED on is default)
Parameters:
port - [which sensor port to use]
*connection - [attach a connection]
mode - [set the sensor mode (default is percent mode)]
led - [set the LED mode to either LED_ON or LED_OFF (default is LED_ON)]

~Light

public ~Light();


Method Detail

set

public void set( unsigned int value );
Turn the LED on or off
Parameters:
value - [use LED_ON or LED_OFF to determine the state of the LED]

 Overview   Project   Class   Tree   Index 
NXT C++ Bluetooth Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD