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

mindsensors-lineleader.h File Reference

Mindsensors Line Tracking Sensor. More...

#include "common.h"

Go to the source code of this file.

Defines

#define LL_I2C_ADDR   0x02
#define LL_CMD_REG   0x41
#define LL_SETPOINT   0x45
#define LL_KP_VALUE   0x46
#define LL_KI_VALUE   0X47
#define LL_KD_VALUE   0X48
#define LL_KP_FACTOR   0x61
#define LL_KI_FACTOR   0X62
#define LL_KD_FACTOR   0X63
#define LL_READ_STEERING   0x42
#define LL_READ_AVERAGE   0X43
#define LL_READ_RESULT   0X44
#define LL_SENSOR_RAW   0X49
#define LL_WHITE_LIMIT   0X51
#define LL_BLACK_LIMIT   0X59
#define LL_SENSOR_UNCAL   0x74

Functions

bool LLinit (tSensors link)
bool LLwakeUp (tSensors link)
bool LLsleep (tSensors link)
bool LLinvertLineColor (tSensors link)
bool LLresetLineColor (tSensors link)
bool LLtakeSnapshot (tSensors link)
bool LLcalWhite (tSensors link)
bool LLcalBlack (tSensors link)
bool LLsetPoint (tSensors link, ubyte data)
int LLsetPoint (tSensors link)
bool LLsetKp (tSensors link, ubyte data, ubyte factor)
int LLreadKp (tSensors link)
int LLreadKpFactor (tSensors link)
bool LLsetKi (tSensors link, ubyte data, ubyte factor)
int LLreadKi (tSensors link)
int LLreadKiFactor (tSensors link)
bool LLsetKd (tSensors link, ubyte data, ubyte factor)
int LLreadKd (tSensors link)
int LLreadKdFactor (tSensors link)
int LLreadSteering (tSensors link)
int LLreadAverage (tSensors link)
int LLreadResult (tSensors link)
bool LLreadSensorRaw (tSensors link, tByteArray &pMsg)
bool LLreadSensorUncalibrated (tSensors link, tIntArray &sensorValues)
bool LLreadWhiteThresh (tSensors link, tByteArray &pMsg)
bool LLreadBlackThresh (tSensors link, tByteArray &pMsg)
bool _lineLeader_cmd (tSensors link, ubyte cmd)
bool _lineLeader_write (tSensors link, ubyte regToWrite, ubyte data)
bool _lineLeader_read (tSensors link, ubyte regToRead, ubyte &retval)
bool _lineLeader_read (tSensors link, ubyte regToRead, int numBytes, tByteArray &pDataMsg)

Variables

tByteArray LL_I2CRequest
tByteArray LL_I2CReply
ubyte oneByte

Detailed Description

Mindsensors Line Tracking Sensor.

mindsensors-lineleader.h provides an API for the Mindsensors Line Tracking Sensor.

Changelog:

License: You may use this code as you wish, provided you give credit where it's due.

THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.59 AND HIGHER.

Author:
Thom Roach
Xander Soldaat (version 0.4+)
Date:
29 October 2009
Version:
0.6

Definition in file mindsensors-lineleader.h.