PiStorms  4.015
PiStorms Library Reference by mindsensors.com
 All Classes Namespaces Files Functions Variables
mindsensors.CURRENT Class Reference

CURRENT: this class provides functions for NXTCurrentMeter from mindsensors.com for read and write operations. More...

Inheritance diagram for mindsensors.CURRENT:

Public Member Functions

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

Static Public Attributes

tuple CURRENT_ADDRESS = (0x28)
 Default CurrentMeter I2C Address.
 
int COMMAND = 0x41
 Command Register.
 
int CAL = 0x43
 Absolute Calibrated Current value Register. More...
 
int REL = 0x45
 Relative Current value Register. More...
 
int REF = 0x47
 Reference Current value Register. More...
 

Detailed Description

CURRENT: this class provides functions for NXTCurrentMeter from mindsensors.com for read and write operations.

Constructor & Destructor Documentation

def mindsensors.CURRENT.__init__ (   self,
  current_address = CURRENT_ADDRESS 
)

Initialize the class with the i2c address of your NXTCurrentMeter.

Parameters
selfThe object pointer.
current_addressAddress of your NXTCurrentMeter.

Member Function Documentation

def mindsensors.CURRENT.command (   self,
  cmd 
)

Writes a value to the command register.

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

Reads the absolute current value in milliAmps.

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

Reads the reference current value in milliAmps.

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

Reads the relative current value in milliAmps.

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

Sets the reference current equal to the absolute current value.

Parameters
selfThe object pointer.

Member Data Documentation

int mindsensors.CURRENT.CAL = 0x43
static

Absolute Calibrated Current value Register.

Will Return a signed integer value

int mindsensors.CURRENT.REF = 0x47
static

Reference Current value Register.

Will Return a signed integer value

int mindsensors.CURRENT.REL = 0x45
static

Relative Current value Register.

Will Return a signed integer value


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