ECRobot C++ API for LEGO MINDSTORMS NXT  1.0.10
ecrobot::Daq Class Reference

Data acquistion class for NXT GamePad data logging. More...

#include <Daq.h>

List of all members.

Public Member Functions

 Daq (Bluetooth &bt)
 Constructor.
void send (S8 dataS08[2], S32 dataS32)
 Send data to NXT GamePad (almost equivalent to ecrobot_bt_data_logger).
void send (S8 dataS08[2], U16 dataU16, S16 dataS16[4], S32 dataS32[4])
 Send data to NXT GamePad.

Detailed Description

Data acquistion class for NXT GamePad data logging.


Constructor & Destructor Documentation

Constructor.

Parameters:
btReference of a Bluetooth object.
Returns:
-

Member Function Documentation

void ecrobot::Daq::send ( S8  dataS08[2],
S32  dataS32 
)

Send data to NXT GamePad (almost equivalent to ecrobot_bt_data_logger).

Parameters:
dataS08Data to be saved to "Data1" and "Data2" column in a csv file.
dataS32Data to be saved to "I2C" column in a csv file.

Byte frame:   CSV column name:   Data
byte00-03:   Time:   System clock in msec
byte04:   Data1:   dataS08[0]
byte05:   Data2:   dataS08[1]
byte06-07:   Battery:   Battery voltage in mV
byte08-11:   Motor Rev A:   Motor count at Port A
byte12-15:   Motor Rev B:   Motor count at Port B
byte16-19:   Motor Rev C:   Motor count at Port C
byte20-21:   ADC S1:   A/D raw value at Port S1
byte22-23:   ADC S2:   A/D raw value at Port S2
byte24-25:   ADC S3:   A/D raw value at Port S3
byte26-27:   ADC S4:   A/D raw value at Port S4
byte28-31:   I2C:   dataS32
Returns:
-
void ecrobot::Daq::send ( S8  dataS08[2],
U16  dataU16,
S16  dataS16[4],
S32  dataS32[4] 
)

Send data to NXT GamePad.

Parameters:
dataS08Data to be saved to "Data1" and "Data2" column in a csv file.
dataU16Data to be saved to "Battery" column in a csv file.
dataS16Data to be saved to "ADC S1/ADC S2/ADC S3/ADC S4" column in a csv file.
dataS32Data to be saved to "Motor Rev A/Motor Rev B/Motor Rev C/I2C" column in a csv file.

Byte frame:   CSV column name:   Data
byte00-03:   Time:   System clock in msec
byte04:   Data1:   dataS08[0]
byte05:   Data2:   dataS08[1]
byte06-07:   Battery:   dataU16
byte08-11:   Motor Rev A:   dataS32[0]
byte12-15:   Motor Rev B:   dataS32[1]
byte16-19:   Motor Rev C:   dataS32[2]
byte20-21:   ADC S1:   dataS16[0]
byte22-23:   ADC S2:   dataS16[1]
byte24-25:   ADC S3:   dataS16[2]
byte26-27:   ADC S4:   dataS16[3]
byte28-31:   I2C:   dataS32[3]
Returns:
-

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations Enumerator Friends Defines