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

SensorMUX Sensor
[Mindsensors]

Files

file  mindsensors-sensormux.h
 

Mindsensors SensorMUX Sensor driver.


Defines

#define MSMX_I2C_ADDR   0x24
#define MSMX_REG_CHANSEL   0x42
#define MSMX_REG_VOLTAGE   0x43

Functions

void MSSMUXsetChan (tSensors link, int channel)
int MSSMUXreadBattery (tSensors link)

Variables

tByteArray MSMX_I2CRequest
tByteArray MSMX_I2CReply

Detailed Description

Mindsensors SensorMUX Sensor (MSSMUX) driver


Define Documentation

#define MSMX_I2C_ADDR   0x24

Definition at line 42 of file mindsensors-sensormux.h.

#define MSMX_REG_CHANSEL   0x42

Definition at line 43 of file mindsensors-sensormux.h.

#define MSMX_REG_VOLTAGE   0x43

Definition at line 44 of file mindsensors-sensormux.h.


Function Documentation

int MSSMUXreadBattery ( tSensors  link )

Read the voltage level of the external battery.

Parameters:
linkthe port number
Returns:
the battery voltage in mV
Examples:
mindsensors-sensormux-test1.c.

Definition at line 59 of file mindsensors-sensormux.h.

void MSSMUXsetChan ( tSensors  link,
int  channel 
)

Switch to the specified channel

Parameters:
linkthe port number
channelthe sensor mux channel number
Examples:
mindsensors-sensormux-test1.c, and mindsensors-sensormux-test2.c.

Definition at line 90 of file mindsensors-sensormux.h.


Variable Documentation

Array to hold I2C reply data

Definition at line 48 of file mindsensors-sensormux.h.

Array to hold I2C command data

Definition at line 47 of file mindsensors-sensormux.h.