![]() |
Slush Engine
1.0
Software to control a Slush Engine
|
Public Member Functions | |
def | __init__ (self, board='XLT', debug="LOW") |
def | set_debug_level |
def | initGPIOState (self) |
def | initSPI (self) |
def | initI2C (self) |
def | deinitBoard (self) |
def | setIOState (self, port, pinNumber, state) |
def | getIOState (self, port, pinNumber) |
def | readInput (self, inputNumber) |
def | setOutput (self, outputNumber, state) |
def | readAnalog (self, inputNumber) |
def | setPWMOutput (self, outputNumber, pwmVal) |
Public Attributes | |
board | |
debug | |
bus | |
chip | |
Static Public Attributes | |
int | chip = 0 |
int | bus = 0 |
Class to control a Slush Engine Board
def Slush.Board.sBoard.__init__ | ( | self, | |
board = 'XLT' , |
|||
debug = "LOW" |
|||
) |
initialize all of the controllers peripheral devices
def Slush.Board.sBoard.initGPIOState | ( | self | ) |
sets the default states for the GPIO on the slush modules. *This is currently only targeted at the Raspberry Pi. Other target devices will be added in a similar format.
def Slush.Board.sBoard.initSPI | ( | self | ) |
initalizes the spi for use with the motor driver modules
def Slush.Board.sBoard.initI2C | ( | self | ) |
initalizes the i2c bus without relation to any of its slaves
def Slush.Board.sBoard.deinitBoard | ( | self | ) |
closes the board and deinits the peripherals
def Slush.Board.sBoard.setIOState | ( | self, | |
port, | |||
pinNumber, | |||
state | |||
) |
sets the output state of the industrial outputs on the SlushEngine. This currently does not support the digital IO
def Slush.Board.sBoard.getIOState | ( | self, | |
port, | |||
pinNumber | |||
) |
sets the output state of the industrial outputs on the SlushEngine. This currently does not support the digitial IO
def Slush.Board.sBoard.readInput | ( | self, | |
inputNumber | |||
) |
sets the input to digital with a pullup and returns a read value
def Slush.Board.sBoard.setOutput | ( | self, | |
outputNumber, | |||
state | |||
) |
sets the output state of the IO to digital and then sets the state of the pin
def Slush.Board.sBoard.readAnalog | ( | self, | |
inputNumber | |||
) |
sets the IO to analog and then returns a read value (10-bit)
def Slush.Board.sBoard.setPWMOutput | ( | self, | |
outputNumber, | |||
pwmVal | |||
) |
sets the output to PWM (500Hz) and sets the duty cycle to % PWMVal/255