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..
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)
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!