How to send with the MKR RS485?

Hello Everybody,
I’m stuck with something stupid. Here my Problem:
I have an old version of a Flapclock which was given to me as a gift. Now i want to upgrade it to use Internet Network Time instead of the RTC.
The old clocks brain is an Arduino Uno, with a RTC and an RS485 Shield with the MAXIM485.

Now i wanted to upgrade it and thought: “hey, why not use the new MKR 1010 with WIFI and the MKR485 (MAXIM 3157) Shield”.

Using this Example here: https://github.com/arduino-libraries/ArduinoRS485/blob/master/examples/RS485Sender/RS485Sender.ino
I connected the ISO GND to GND of the Flap. The Y and Z to A/B respectively. One of the clock elements is configured on Address: 2 and even asked it to reconfigure it to this address.
I read the Documentation and the Protocol used for this RS485 is at 19200Baud and 8N1.
The Protocol can also be found here: https://github.com/adfinis-sygroup/sbb-fallblatt/blob/master/doc/protocol_new_modules.md
The command which I’m required to send is following this structure: FF ( < VALUE1> ( …) )
Knowing i have to send it to Address two one Step I get: 00, FF, C0, 02, C6
Nothing is happening and moving… what am i missing here?
Do I need to increase the voltage to 5V?

I’m stuck… Tried to connect it from A/B instead Y/Z uniform the ground etc…
Thank you for any idea, what I could try further!

Here my code to debug:

byte CMD_SET_POS[] = {
  0x00, 0xFF, 0x02, 0xC6, 0x02
};

#include <ArduinoRS485.h>

void setup() {
  RS485.begin(19200);
}

void loop() {
        Serial.print("Loop");
        RS485.beginTransmission();
        RS485.write(CMD_SET_POS,5);
       
        delay(2000);
        RS485.endTransmission();
}

Knowing i have to send it to Address two one Step I get: 00, FF, C0, 02, C6
Nothing is happening and moving... what am i missing here?

What do you expect to happen? Does a position 0xC6 exist?

BTW: in your code you have another byte order! A 0x02 command does not exist.

Thank you Pylon!
The order of the command were due to the frustration while Debugging. Sorry :slight_smile:
Anyway, thank you for giving me again a boost. I continued to find the culprit and it was just that the Break signal has to be a certain length as it seemed. Only then the device would go into the listening mode.
Well did i loose time on this one :slight_smile:
Thank you again for this boost and help!