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

NXT C++ Bluetooth Library
Class Gyro

Sensor
   |
   +--Gyro

   in gyro.h

class Gyro
extends Sensor

Class for HiTechnic Gyro 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
Gyro( Sensor_port port, Connection* connection, int offset = 0 )
          Constructor for the Gyro sensor (default offset is set to zero)
~Gyro()
          
 
Method Summary
 Sensor_type get_type()
          Get the sensor type
 string print()
          Get the sensor reading as a string (init method will be called if the sensor has not been initialized)
 int read()
          Read the sensor value () (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

Gyro

public Gyro( Sensor_port port, Connection* connection, int offset = 0 );
Constructor for the Gyro sensor (default offset is set to zero)
Parameters:
port - [which sensor port to use]
*connection - [attach a connection]
offset - [set the offset]

~Gyro

public ~Gyro();


Method Detail

get_type

public Sensor_type get_type();
Get the sensor type
Returns:
GYRO

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 + " deg/sec"

read

public int read();
Read the sensor value () (init method will be called if the sensor has not been initialized)
Returns:
change in angle pr second (deg/sec)

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