- Download pymodbus and dependencies
sudo pip install -U pymodbus[twisted]
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
sudo pip install bcrypt
pip install service_identity
- start each (modbus-master and modbus-slave) on one Raspberry PI with RS-485 adapter
- the modbus-slave has to be connected to an LED
- to turn the LED on and off via modbus browse on your laptop the webserver which were started by the modbus-master
- a 120 ohm resistor must be connected to each of the RS-485 adapter
- the Raspberry PI UARTs may need to be configured, see documentation, if so then restart afterwards
- both Raspberry PI must be connected with the same network
- to allow Port 22 use
sudo ufw allow 22
and reboot
- 2x Raspberry PI 3 B+
- 2x RS-485 adapter
- 2x 120 ohm termination resistors
- serial cable
- breadboard & led