sbustest.py 238 B

123456789
  1. import sbus
  2. import time
  3. inst = sbus.Instrument(slaveaddress=3, serial_port="/dev/ttyUSB0", baudrate=38400)
  4. result = inst.read_register(20)
  5. print(result)
  6. result = inst.read_registers(10, number_of_registers=4, signed=True)
  7. print(result)