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

NXT C++ Bluetooth Library
Class Temperature

Sensor
   |
   +--Temperature

   in temperature.h

class Temperature
extends Sensor

Class for RCX temperature 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
Temperature( Sensor_port port, Connection* connection, Temp_mode mode = CELSIUS )
          Constructor for the temperature sensor (default TEMP_MODE is celsius)
~Temperature()
          
 
Method Summary
 string print()
          Get the sensor reading as a string (init method will be called if the sensor has not been initialized)
   
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

Temperature

public Temperature( Sensor_port port, Connection* connection, Temp_mode mode = CELSIUS );
Constructor for the temperature sensor (default TEMP_MODE is celsius)
Parameters:
port - [which sensor port to use]
*connection - [attach a connection]
mode - [set the TEMP mode to either CELSIUS or FAHRENHEIT (default is CELSIUS)]

~Temperature

public ~Temperature();


Method Detail

print

public string print();
Get the sensor reading as a string (init method will be called if the sensor has not been initialized)
Returns:
sensor reading as a string + either " Celsius" or " Fahrenheit"

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