Hi I have a trouble with reading ModBus Registers I'm using a Udoo Neo Full Board along with Linksprite RS485Sheild V2.1 The embedded arduino is used with ModBus Master Library. Tx LED Blinks in the Shield but only thing I get is 226 ---- My arduino Sketch #include <ModbusMaster.h> ModbusMaster node; void setup() { // put your setup code here, to run once: Serial0.begin(9600); Serial.begin(9600); node.begin(1, Serial0); } void loop() { // put your main code here, to run repeatedly: static uint32_t i; uint8_t result; i++; node.setTransmitBuffer(0, lowWord(i)); node.setTransmitBuffer(1, highWord(i)); result = node.readHoldingRegisters(2, 2); Serial.println(result); delay(1000); } Please Help !!!
Does it send 0x00 bytes (0)? Because then you run into a known issue: https://www.udoo.org/forum/threads/issue-with-serial0-write-0.5135/ the proposed sulution of flushing is not always working:"https://www.udoo.org/forum/threads/uart-sensor-doesnt-work.9703/
And what if you use another Modbus Library like this: https://github.com/angeloc/simplemodbusng The Arduino Neo is not fully compatible with normal Arduino's so you have to try some libraries until you hopefully find a working one.
The solution should work. In that situation probably didn't because of the sensor and not because of UDOO.