Arduino Forum

Topics => Home Automation and Networked Objects => Topic started by: shintya on Jan 08, 2017, 08:32 pm

Title: energy meter spm91, rs485 module, protocol modbus, esp8266
Post by: shintya on Jan 08, 2017, 08:32 pm
Did anyone ever use energy meter spm91 and rs485 to communicate it with the arduino uno? Please tell me. I always find the error says "modbus_construct was not declared". I think i can't find the right library for the rs485. Please help me how to fix it . Or maybe anyone have the correct library? Thanks btw. I really need help..
Title: Re: energy meter spm91, rs485 module, protocol modbus, esp8266
Post by: rw950431 on Jan 10, 2017, 04:17 am
I'm not an RS485 expert but there is a long thread on similar issues starting here (https://forum.arduino.cc/index.php?topic=176142.0)
Title: Re: energy meter spm91, rs485 module, protocol modbus, esp8266
Post by: pylon on Jan 11, 2017, 03:26 pm
Quote
I always find the error says "modbus_construct was not declared". I think i can't find the right library for the rs485.
You neither provide a link to the library you're using nor did you post your code.

I also suppose you mixed example code with the wrong library.

You don't need a library for RS-485 (that's the physical serial interface) but for the ModBus protocol. There are a lot of libraries available on the Internet, all of them using a different approach and none of them implementing the complete standard.

Also post a link to the energy meter spm91's datasheet/manual!