brainelectronics / micropython-modbus

MicroPython Modbus RTU Slave/Master and TCP Server/Slave library
GNU General Public License v3.0
104 stars 45 forks source link

Compatibility with W5500 or ENC28J60 - SPI to Ethernet Modules #70

Closed ohbhatt closed 1 year ago

ohbhatt commented 1 year ago

Description

I am a beginner with both MicroPython & Ethernet communication. Can you guide me with using this library with an ESP32 or STM32 connected via SPI to W5500 or ENC28J60 module - Link (Note that there might be other devices connected to that SPI bus with their own CS pins).

I would really appreciate your help and guidance.

beyonlo commented 1 year ago

@ohbhatt This library is just about ModBus RTU/TCP (Slave and Master). You need first have success with your ethernet and after to use this lib.

Anyway, the new version of MicroPython 1.20 support (for ESP32 family) now the SPI ethernet modules, like as the W5500. So, you can to use the ESP32 with that W5500 SPI.

After that, you can to start using some examples from here: https://github.com/brainelectronics/micropython-modbus/tree/develop/examples