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

hitechnic-compass.h File Reference

HiTechnic Magnetic Compass Sensor Driver. More...

#include "common.h"

Go to the source code of this file.

Defines

#define HTMC_I2C_ADDR   0x02
#define HTMC_MODE   0x41
#define HTMC_HEAD_U   0x42
#define HTMC_HEAD_L   0x43
#define HTMC_MEASURE_CMD   0x00
#define HTMC_CALIBRATE_CMD   0x43

Functions

bool HTMCstartCal (tSensors link)
bool HTMCstopCal (tSensors link)
int HTMCreadHeading (tSensors link)
int HTMCreadRelativeHeading (tSensors link)
int HTMCsetTarget (tSensors link, int offset=0)
int HTMCreadHeading (tMUXSensor muxsensor)
int HTMCreadRelativeHeading (tMUXSensor muxsensor)
int HTMCsetTarget (tMUXSensor muxsensor, int offset=0)

Variables

tConfigParams HTMC_config = {HTSMUX_CHAN_I2C, 2, 0x02, 0x42}
tByteArray HTMC_I2CRequest
tByteArray HTMC_I2CReply
int target [][]

Detailed Description

HiTechnic Magnetic Compass Sensor Driver.

hitechnic-compass.h provides an API for the HiTechnic Magnetic Compass Sensor.

Changelog:

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:
18 January 2011
Version:
0.7

Definition in file hitechnic-compass.h.