LabJackPython Example
>>> import u12
>>> d = u12.U12()
open called
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0]
Received: [0x57, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0]
>>> d.rawSPI([1,2,3,4], NumberOfBytesToWriteRead = 4)
Writing: [0x4, 0x3, 0x2, 0x1, 0x1, 0x62, 0x4, 0x0]
Received: [0x4, 0x3, 0x2, 0x1, 0x1, 0x62, 0x4, 0x0]
{
'DataByte3': 4, 'DataByte2': 3, 'DataByte1': 2, 'DataByte0': 1,
'ErrorFlags':
<BitField object: [ CSStateTris Error Flag = 0 (0),
SCKTris Error Flag = 0 (0),
MISOTris Error Flag = 0 (0),
MOSITris Error Flag = 1 (1) ] >
}
5.15 - SHT1X
Sends and receives data from a SHT1X T/RH sensor from Sensirion.
Baud rate without delay is about 2 kpbs.
DATA is IO0, SCK is IO1
Enable is not handled by this function.