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

hitechnic-irseeker-v2.h File Reference

HiTechnic IR Seeker V2 driver. More...

#include "common.h"

Go to the source code of this file.

Defines

#define HTIRS2_I2C_ADDR   0x10
#define HTIRS2_DSP_MODE   0x41
#define HTIRS2_OFFSET   0x42
#define HTIRS2_DC_DIR   0x00
#define HTIRS2_DC_SSTR1   0x01
#define HTIRS2_DC_SSTR2   0x02
#define HTIRS2_DC_SSTR3   0x03
#define HTIRS2_DC_SSTR4   0x04
#define HTIRS2_DC_SSTR5   0x05
#define HTIRS2_DC_SAVG   0x06
#define HTIRS2_AC_DIR   0x07
#define HTIRS2_AC_SSTR1   0x08
#define HTIRS2_AC_SSTR2   0x09
#define HTIRS2_AC_SSTR3   0x0A
#define HTIRS2_AC_SSTR4   0x0B
#define HTIRS2_AC_SSTR5   0x0C

Enumerations

enum  tHTIRS2DSPMode { DSP_1200 = 0, DSP_600 = 1 }

Functions

int HTIRS2readDCDir (tSensors link)
bool HTIRS2readAllDCStrength (tSensors link, int &dcS1, int &dcS2, int &dcS3, int &dcS4, int &dcS5)
int HTIRS2readDCAverage (tSensors link)
bool HTIRS2setDSPMode (tSensors link, tHTIRS2DSPMode mode)
int HTIRS2readACDir (tSensors link)
bool HTIRS2readAllACStrength (tSensors link, int &acS1, int &acS2, int &acS3, int &acS4, int &acS5)
bool HTIRS2readEnhanced (tSensors link, int &dir, int &strength)
int HTIRS2readDCDir (tMUXSensor muxsensor)
bool HTIRS2readAllDCStrength (tMUXSensor muxsensor, int &dcS1, int &dcS2, int &dcS3, int &dcS4, int &dcS5)
int HTIRS2readDCAverage (tMUXSensor muxsensor)
int HTIRS2readACDir (tMUXSensor muxsensor)
bool HTIRS2readAllACStrength (tMUXSensor muxsensor, int &acS1, int &acS2, int &acS3, int &acS4, int &acS5)
bool HTIRS2readEnhanced (tMUXSensor muxsensor, int &dir, int &strength)

Variables

tConfigParams HTIRS2_config = {HTSMUX_CHAN_I2C, 13, 0x10, 0x42}
tByteArray HTIRS2_I2CRequest
tByteArray HTIRS2_I2CReply

Detailed Description

HiTechnic IR Seeker V2 driver.

hitechnic-irseeker-v2.h provides an API for the HiTechnic IR Seeker V2.

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 (mightor_at_gmail.com)
Date:
06 April 2010
Version:
0.5

Definition in file hitechnic-irseeker-v2.h.