Practical Clean Architecture backend example built with FastAPI. No stateful globals (DI), low coupling (DIP), tactical DDD, CQRS, proper UoW usage. REST API, per ...
Talks Modbus RTU over the serial port via pymodbus (async). local_polling. Reads relay state with function 0x01 (read coils from 0x0000), sets relays with 0x05 (write coil; 0xFF00 / 0x0000), ...
[导读]在老旧产线改造中,常有大量RS485 Modbus RTU设备(温湿度、电表、变频器)需要接入上位机或MES,但它们不支持TCP。此时用Raspberry Pi(树莓派)运行Modbus TCP↔RTU网关程序,既能做协议转换,又能充当边缘数据预处理节点。本文基于Raspberry Pi OS + pymodbus库,给 ...