openmv/scripts/examples/32-modbus/modbus_rtu_slave.py
2019-06-13 14:59:05 +02:00

13 lines
231 B
Python

import time
from pyb import UART
from modbus import ModbusRTU
uart = UART(3)
modbus = ModbusRTU(uart)
while(True):
if modbus.any():
modbus.handle()
else:
time.sleep(100)
# image processing in there