smarmengol / Modbus-Master-Slave-for-Arduino

Modbus Master-Slave library for Arduino
GNU Lesser General Public License v2.1
483 stars 330 forks source link

Modbus betweeen two arduinos #19

Closed nkl-nklc closed 5 years ago

nkl-nklc commented 7 years ago

Hello,

I have seen your project on github. I am doing project for school which should simulate modbus communication between two arduinos. I have used your examples for master and slave, and made both working independently (I am simulating master and slave on PC and querying for data from arduino and receiving everything fine on all functions except ones that are not implemented - 1,2,15).

I have set up some registers on slave to read analog or digital values, and I want top read them on master, and based on information i get on master from slave, to turn on some LED on slave.

As i said, everything works on PC testing, but now i need to connect two arduinos, and I need help from you.

http://img.dxcdn.com/productimages/sku_163849_3.jpg

https://cdn.sparkfun.com//assets/parts/8/4/3/6/11959-01.jpg

What do i need to alter in your code to make this communication work ? I. How to include software serial to make this work ?

Also, do you have in plan to implement functions 1,2,15 ?