PiStorms  4.012
PiStorms Library Reference by mindsensors.com
 All Classes Namespaces Files Functions Variables
mindsensors.VOLT Class Reference

Volt: this class provides functions for NXTVoltMeter from mindsensors.com for read and write operations. More...

Inheritance diagram for mindsensors.VOLT:

Public Member Functions

def __init__
 Initialize the class with the i2c address of your NXTVoltMeter. More...
 
def command
 Writes a value to the command register. More...
 
def get_calibrated
 Reads the absolute voltage of the NXTVoltMeter. More...
 
def get_relative
 Reads the relative voltage of the NXTVoltMeter. More...
 
def get_reference
 Reads the reference voltage of the NXTVoltMeter. More...
 
def set_reference
 Sets the reference voltage to the current absolute voltage value. More...
 

Static Public Attributes

tuple VOLT_ADDRESS = (0x26)
 Default VoltMeter I2C Address.
 
int COMMAND = 0x41
 Command Register.
 
int CAL = 0x43
 Absolute Calibrated Voltage value Register. More...
 
int REL = 0x45
 Relative Voltage value Register. More...
 
int REF = 0x47
 Reference Voltage value Register. More...
 

Detailed Description

Volt: this class provides functions for NXTVoltMeter from mindsensors.com for read and write operations.

Constructor & Destructor Documentation

def mindsensors.VOLT.__init__ (   self,
  volt_address = VOLT_ADDRESS 
)

Initialize the class with the i2c address of your NXTVoltMeter.

Parameters
selfThe object pointer.
volt_addressAddress of your NXTVoltMeter.

Member Function Documentation

def mindsensors.VOLT.command (   self,
  cmd 
)

Writes a value to the command register.

Parameters
selfThe object pointer.
cmdValue to write to the command register.
def mindsensors.VOLT.get_calibrated (   self)

Reads the absolute voltage of the NXTVoltMeter.

Parameters
selfThe object pointer.
def mindsensors.VOLT.get_reference (   self)

Reads the reference voltage of the NXTVoltMeter.

Parameters
selfThe object pointer.
def mindsensors.VOLT.get_relative (   self)

Reads the relative voltage of the NXTVoltMeter.

Parameters
selfThe object pointer.
def mindsensors.VOLT.set_reference (   self)

Sets the reference voltage to the current absolute voltage value.

Parameters
selfThe object pointer.

Member Data Documentation

int mindsensors.VOLT.CAL = 0x43
static

Absolute Calibrated Voltage value Register.

Will Return a signed integer value

int mindsensors.VOLT.REF = 0x47
static

Reference Voltage value Register.

Will Return a signed integer value

int mindsensors.VOLT.REL = 0x45
static

Relative Voltage value Register.

Will Return a signed integer value


The documentation for this class was generated from the following file: