Hello,
I am working a project to connect an Acurev 1300 (https://www.accuenergy.com/files/acurev/AcuRev-1300-User-Manual.pdf) to the Particle Electron. The Acurev transmits data through rs485 communication, so I decided to use a max485 circuit board (http://hobbycomponents.com/wired-wireless/663-max485-rs485-transceiver-module) and the Modbus Master Library (https://github.com/pkourany/ModBusMaster). However, I am struggling to make this work.
My circuit follows the diagram below:
And my current test code is:
#include <ModbusMaster.h>
ModbusMaster node(200);
void setup() {
node.begin(9600);
Serial.begin(115200);
}
// loop() runs over and over again, as quickly as it can execute.
void loop() {
uint8_t result = node.readHoldingRegisters(0x1048, 1);
if(result == node.ku8MBSuccess) {
Serial.println(result);
} else {
Serial.println("not working");
}
delay(5000);
}
Can you help me figure out the problems with the circuit/code?