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

mindsensors-pressure.h File Reference

Mindsensors PPS-v3 driver. More...

#include "common.h"

Go to the source code of this file.

Defines

#define MSPPS_I2C_ADDR   0x18
#define MSPPS_CMD   0x41
#define MSPPS_UNIT   0x42
#define MSPPS_PRESS_ABS   0x43
#define MSPPS_PRESS_GAUGE   0x45
#define MSPPS_PRESS_REF   0x47
#define MSPPS_UNIT_PSI   0x50
#define MSPPS_UNIT_MB   0x62
#define MSPPS_UNIT_KPA   0x6B
#define MSPSS_CMD_SETREF   0x44
#define MSPPSsetUnitPSI(X)   MSPPSsetUnit(X, MSPPS_UNIT_PSI)
#define MSPPSsetUnitmB(X)   MSPPSsetUnit(X, MSPPS_UNIT_MB)
#define MSPPSsetUnitkPa(X)   MSPPSsetUnit(X, MSPPS_UNIT_KPA)

Functions

bool MSPPSsendCmd (tSensors link, ubyte command)
bool MSPPSsetUnit (tSensors link, ubyte unit)
long MSPPSreadPressure (tSensors link, ubyte reg)
long MSPPSreadAbsPressure (tSensors link)
long MSPPSreadGaugePressure (tSensors link)
long MSPPSreadRefPressure (tSensors link)
bool MSPPSsetRefPressure (tSensors link)
bool MSPPSsetRefPressure (tSensors link, int refpressure)

Variables

tByteArray MSPPS_I2CRequest
tByteArray MSPPS_I2CReply

Detailed Description

Mindsensors PPS-v3 driver.

mindsensors-pressure.h provides an API for the Mindsensors PPS-v3 Pressure Sensor driver

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:
01 January 2012
Version:
0.1

Definition in file mindsensors-pressure.h.