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

mindsensors-irdist.h File Reference

Mindsensors DIST-Nx driver. More...

#include "common.h"

Go to the source code of this file.

Defines

#define MSDIST_I2C_ADDR   0x02
#define MSDIST_CMD   0x41
#define MSDIST_DIST   0x42
#define MSDIST_VOLT   0x44
#define MSDIST_MOD_TYPE   0x50
#define MSDIST_MINDIST   0x52
#define MSDIST_MAXDIST   0x54
#define MSDIST_GP2D12   0x31
#define MSDIST_GP2D120   0x32
#define MSDIST_GP2YA21   0x33
#define MSDIST_GP2YA02   0x34
#define MSDIST_CUSTOM   0x35

Functions

int MSDISTreadDist (tSensors link, ubyte address=MSDIST_I2C_ADDR)
int MSDISTreadVoltage (tSensors link, ubyte address=MSDIST_I2C_ADDR)
int MSDISTreadMinDist (tSensors link, ubyte address=MSDIST_I2C_ADDR)
int MSDISTreadMaxDist (tSensors link, ubyte address=MSDIST_I2C_ADDR)
int MSDISTreadModuleType (tSensors link, ubyte address=MSDIST_I2C_ADDR)
bool MSDISTsendCmd (tSensors link, byte command, ubyte address=MSDIST_I2C_ADDR)

Variables

tByteArray MSDIST_I2CRequest
tByteArray MSDIST_I2CReply
bool MSDISTcalibrated [] = {false, false, false, false}

Detailed Description

Mindsensors DIST-Nx driver.

mindsensors-irdist.h provides an API for the Mindsensors DIST-Nx 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:
18 December 2010
Version:
0.4

Definition in file mindsensors-irdist.h.