Decreased SHT read time to 10 ms; changed baud to 19200
This commit is contained in:
@@ -6,11 +6,11 @@ import serial
|
||||
slave_address = 254
|
||||
instrument = minimalmodbus.Instrument('/dev/ttyUSB0', slave_address, close_port_after_each_call=True) # port name, slave address (in decimal)
|
||||
|
||||
instrument.serial.baudrate = 115200
|
||||
instrument.serial.baudrate = 19200
|
||||
instrument.serial.bytesize = 8
|
||||
instrument.serial.parity = serial.PARITY_EVEN
|
||||
instrument.serial.stopbits = 1
|
||||
instrument.serial.timeout = 0.1 # seconds
|
||||
instrument.serial.timeout = 0.05 # seconds
|
||||
instrument.mode = minimalmodbus.MODE_RTU # rtu or ascii mode
|
||||
instrument.clear_buffers_before_each_transaction = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user