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

hitechnic-angle.h File Reference

HiTechnic Angle Sensor driver. More...

#include "common.h"

Go to the source code of this file.

Defines

#define HTANG_I2C_ADDR   0x02
#define HTANG_CMD_REG   0x41
#define HTANG_OFFSET   0x42
#define HTANG_ANG2   0x00
#define HTANG_ANG1   0x01
#define HTANG_ACC_ANG_B4   0x02
#define HTANG_ACC_ANG_B3   0x03
#define HTANG_ACC_ANG_B2   0x04
#define HTANG_ACC_ANG_B1   0x05
#define HTANG_RPM_H   0x06
#define HTANG_RPM_L   0x07
#define HTANG_CMD_MEASURE   0x00
#define HTANG_CMD_RST_ANG   0x43
#define HTANG_CMD_RST_ACC_ANG   0x52

Functions

int HTANGreadAngle (tSensors link)
long HTANGreadAccumulatedAngle (tSensors link)
int HTANGreadRPM (tSensors link)
bool HTANGresetAngle (tSensors link)
bool HTANGresetAccumulatedAngle (tSensors link)
bool _HTANGsendCommand (tSensors link, byte command)
int HTANGreadAngle (tMUXSensor muxsensor)
long HTANGreadAccumulatedAngle (tMUXSensor muxsensor)
int HTANGreadRPM (tMUXSensor muxsensor)

Variables

tConfigParams HTANG_config = {HTSMUX_CHAN_I2C, 8, 0x02, 0x42}
tByteArray HTANG_I2CRequest
tByteArray HTANG_I2CReply

Detailed Description

HiTechnic Angle Sensor driver.

hitechnic-angle.h provides an API for the HiTechnic Angle Sensor.

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:
20 February 2011
Version:
0.2

Definition in file hitechnic-angle.h.