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

mindsensors-powermeter.h File Reference

Mindsensors Power Meter Sensor. More...

#include "common.h"

Go to the source code of this file.

Defines

#define MSPM_I2C_ADDR   0x12
#define MSPM_CMD_REG   0x41
#define MSPM_PCURRENT   0x42
#define MSPM_PVOLTAGE   0x44
#define MSPM_CAPUSED   0x46
#define MSPM_TIME   0x56

Functions

int MSPMreadCurrent (tSensors link, ubyte address=MSPM_I2C_ADDR)
int MSPMreadVoltage (tSensors link, ubyte address=MSPM_I2C_ADDR)
bool MSPMreadVoltageCurrent (tSensors link, int &voltage, int &current, ubyte address=MSPM_I2C_ADDR)
long MSPMreadTime (tSensors link, ubyte address=MSPM_I2C_ADDR)
bool MSPMresetCounters (tSensors link, ubyte address=MSPM_I2C_ADDR)
bool _MSPMsendCommand (tSensors link, byte command, ubyte address)

Variables

tByteArray MSPM_I2CRequest
tByteArray MSPM_I2CReply

Detailed Description

Mindsensors Power Meter Sensor.

mindsensors-powermeter.h provides an API for the Mindsensors Power Meter Sensor.

Changelog:

Credits:

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:
Xander Soldaat
Date:
16 December 2009
Version:
0.1

Definition in file mindsensors-powermeter.h.