|
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 |
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.
Definition in file hitechnic-angle.h.