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

lego-temp.h File Reference

RobotC New Temperature Sensor Driver. More...

#include "common.h"

Go to the source code of this file.

Defines

#define LEGOTMP_I2C_ADDR   0x98
#define LEGOTMP_TEMP   0x00
#define LEGOTMP_CONFIG   0x01

Enumerations

enum  tLEGOTMPAccuracy { A_MIN = 8, A_MEAN1 = 4, A_MEAN2 = 2, A_MAX = 1 }

Functions

bool LEGOTMPreadTemp (tSensors link, float &temp)
bool LEGOTMPreadAccuracy (tSensors link, tLEGOTMPAccuracy &accuracy)
bool LEGOTMPsetAccuracy (tSensors link, tLEGOTMPAccuracy accuracy)
bool LEGOTMPsetSingleShot (tSensors link)
bool LEGOTMPsetContinuous (tSensors link)
bool _LEGOTMPreadConfig (tSensors link, ubyte &config)
tLEGOTMPAccuracy _LEGOTMPconvertAccuracy (ubyte config)
bool _LEGOTMPsetConfig (tSensors link, ubyte &config)

Variables

tByteArray LEGOTMP_I2CRequest
tByteArray LEGOTMP_I2CReply

Detailed Description

RobotC New Temperature Sensor Driver.

lego-temp.h provides an API for the Lego Temperature 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:
Sylvain CACHEUX (sylcalego@cacheux.info)
Xander Soldaat (mightor@gmail.com), version 0.2
Date:
15 february 2010
Version:
0.2

Definition in file lego-temp.h.