![]() |
Python API
|
Base class for PLUX BITalino devices. More...
Classes | |
class | State |
Current device state returned by BITalinoDev::getState() More... | |
Public Member Functions | |
__init__ (self, path) | |
Connects to a PLUX device. | |
__init__ (self, baseDev) | |
Promotes a BaseDev instance to BITalinoDev. | |
setDOut (self, output) | |
Assigns the digital outputs states. | |
setBatThreshold (self, threshold) | |
Sets the battery voltage threshold for the low-battery LED. | |
setPWM (self, value) | |
Assigns the analog (PWM) output value (BITalino 2 only). | |
getState (self) | |
Returns current device state (BITalino 2 only) as a State object. | |
![]() | |
getSensors (self) | |
Returns information about attached sensors and internal sensors. | |
start (self, baseFreq, sources) | |
Starts a real-time acquisition session. | |
start (self, freq, portMask, nBits) | |
Starts a real-time acquisition session. | |
start (self, freq, ports, nBits) | |
Starts a real-time acquisition session. | |
stop (self) | |
Stops a real-time acquisition session. | |
getNumChannels (self) | |
Returns the total number of acquisition channels. | |
onRawFrame (self, nSeq, data) | |
Raw frames callback. | |
![]() | |
getProperties (self) | |
Returns the device properties. | |
setParameter (self, port, index, data) | |
Sets a system or sensor parameter value. | |
getBattery (self) | |
Returns a float number with the remaining battery charge as a percentage of full capacity. | |
setTimeout (self, timeout=-1) | |
Sets the receiving timeout value for loop(). | |
loop (self) | |
Runs the device message loop. | |
interrupt (self, param=None) | |
Sends an interrupt signal to loop(). | |
onEvent (self, event) | |
Event callback. | |
onTimeout (self) | |
Timeout callback. | |
onInterrupt (self, param) | |
Interrupt signal callback. | |
close () | |
Disconnects from the device. | |
Additional Inherited Members | |
![]() | |
findDevices (domain='') | |
Finds PLUX devices within the given domain. | |
Base class for PLUX BITalino devices.
plux.BITalinoDev.__init__ | ( | self, | |
path | |||
) |
Connects to a PLUX device.
path | A string with the path to the PLUX device. It has the same meaning as in BaseDev.__init__(). |
Reimplemented from plux.SignalsDev.
plux.BITalinoDev.__init__ | ( | self, | |
baseDev | |||
) |
Promotes a BaseDev instance to BITalinoDev.
baseDev | The BaseDev instance to be promoted. If promotion is successful, baseDev is no longer valid. |
Reimplemented from plux.SignalsDev.
plux.BITalinoDev.setDOut | ( | self, | |
output | |||
) |
Assigns the digital outputs states.
output | Sequence of booleans to assign to digital outputs, starting at first output (O1). On each sequence element, False sets the output to low level and True sets the output to high level. The sequence must contain exactly 4 elements for original BITalino (4 digital outputs) or exactly 2 elements for BITalino 2 (2 digital outputs). |
Reimplemented from plux.SignalsDev.
plux.BITalinoDev.setBatThreshold | ( | self, | |
threshold | |||
) |
Sets the battery voltage threshold for the low-battery LED.
threshold | Battery voltage threshold as an integer.
|
plux.BITalinoDev.setPWM | ( | self, | |
value | |||
) |
Assigns the analog (PWM) output value (BITalino 2 only).
value | Analog output value to set (0...255) as an integer. The analog output voltage is given by: V (in Volts) = 3.3 * (value+1)/256 |
plux.BITalinoDev.getState | ( | self | ) |
Returns current device state (BITalino 2 only) as a State object.