ndsmotion.h File Reference

interface code for the ds motion card, ds motion pak, MK6 More...


Functions

int motion_acceleration_x (void)
 gets acceleration value to mili G (where g is 9.8 m/s*s)
int motion_acceleration_y (void)
 gets acceleration value to mili G (where g is 9.8 m/s*s)
int motion_acceleration_z (void)
 gets acceleration value to mili G (where g is 9.8 m/s*s)
void motion_deinit (void)
 Deinitializes the DS Motion Sensor.
void motion_enable_ain_1 (void)
 This enables the analog input number 1. Required before reading analog input number 1.
void motion_enable_ain_2 (void)
 This enables the analog input number 2. Required before reading analog input number 2.
MotionCalibration * motion_get_calibration (void)
 This returns the current calibration settings for saving.
int motion_init (void)
 Initializes the DS Motion Sensor. Run this before using any of the DS Motion Sensor functions save the return value and pass it to the other motion_ functions.
int motion_read_ain_1 (void)
 This reads the analog input number 1. analog input number 1 needs to be enabled before reading.
int motion_read_ain_2 (void)
 This reads the analog input number 2. analog input number 2 needs to be enabled before reading.
signed int motion_read_gyro (void)
 read the Z rotational speed
signed int motion_read_x (void)
 read the X acceleration
signed int motion_read_y (void)
 read the Y acceleration
signed int motion_read_z (void)
 read the Z acceleration
int motion_rotation (void)
 converts raw rotation value to degrees per second
void motion_set_calibration (MotionCalibration *cal)
 This sets the calibration settings. Intended to restore saved calibration settings.
void motion_set_offs_gyro (void)
 this should be called when the axis is under no rotation default is 1680
void motion_set_offs_x (void)
 this should be called when the axis is under no acceleration default is 2048
void motion_set_offs_y (void)
 this should be called when the axis is under no acceleration default is 2048
void motion_set_offs_z (void)
 this should be called when the axis is under no acceleration default is 2048
void motion_set_sens_x (int sens)
 this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819
void motion_set_sens_y (int sens)
 this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819
void motion_set_sens_z (int sens)
 this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819


Detailed Description

interface code for the ds motion card, ds motion pak, MK6


Function Documentation

void motion_set_calibration ( MotionCalibration *  cal  ) 

This sets the calibration settings. Intended to restore saved calibration settings.

Parameters:
cal the calibration settings

void motion_set_sens_x ( int  sens  ) 

this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819

this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 825

Parameters:
sens the raw reading at 1g for accurate acceleration calculations

void motion_set_sens_y ( int  sens  ) 

this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819

Parameters:
sens the raw reading at 1g for accurate acceleration calculations

void motion_set_sens_z ( int  sens  ) 

this should be passed the raw reading at 1g for accurate acceleration calculations. Default is 819

Parameters:
sens the raw reading at 1g for accurate acceleration calculations


Generated on Sun Mar 7 12:47:54 2010 for libnds by  doxygen 1.5.7.1