Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Defines | Functions | Variables

mindsensors-accelerometer.h File Reference

Mindsensors ACCEL-nx driver. More...

#include "common.h"

Go to the source code of this file.

Defines

#define MSAC_I2C_ADDR   0x02
#define MSAC_CMD   0x41
#define MSAC_X_TILT   0x42
#define MSAC_Y_TILT   0x43
#define MSAC_Z_TILT   0x44
#define MSAC_X_ACCEL   0x45
#define MSAC_Y_ACCEL   0x47
#define MSAC_Z_ACCEL   0x49
#define MSAC_RANGE_2_5   1
#define MSAC_RANGE_3_3   2
#define MSAC_RANGE_6_7   3
#define MSAC_RANGE_10   4

Functions

bool MSACreadTilt (tSensors link, int &x_tilt, int &y_tilt, int &z_tilt)
bool MSACreadAccel (tSensors link, int &x_accel, int &y_accel, int &z_accel)
bool MSACsendCmd (tSensors link, byte command)
bool MSACsetRange (tSensors link, int range)

Variables

tByteArray MSAC_I2CRequest
tByteArray MSAC_I2CReply

Detailed Description

Mindsensors ACCEL-nx driver.

mindsensors-accelerometer.h provides an API for the Mindsensors ACCEL-nx driver

Changelog:

Credits:

License: You may use this code as you wish, provided you give credit where its due.

THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.

Author:
Xander Soldaat (xander_at_botbench.com)
Date:
28 November 2009
Version:
0.2

Definition in file mindsensors-accelerometer.h.