iaq_sensor_wired/tests/test_485_fuzz.py
2021-12-22 18:49:26 +01:00

15 lines
288 B
Python

#!/usr/bin/env python3
#
# Test: 485 fuzzer
# ----------------
# Repeatedly write random data to sensor via 485.
# After that, try to read some input registers.
# (address and baudrate is hardcoded)
#
# Return 0 if read was successful, 1 otherwise.
#
import serial
import minimalmodbus