DMX tester for sending and recieving.

So I'm currently building a small DMX tester which can both check for incoming signal and send DMX signal (not at the same time, the user decides which mode he wants to use). I'm using the DMXSerial library but I'm running into some problems. I'm pretty sure my code is correctly working (although it's the opposite of nice but its just a prototype). the code (ignore the print("test") messages, those where for testing purposes.)

My main problem is the wiring. Instead of using an actual DMXShield, I'm just using the RS485. I don't think that the actual DMX Shield is worth it for this use case.

The only wiring diagram I've found which uses both the DMXSerial library and the RS485 was the one on this website: wiring diagram.

So my questions are,

  1. is the wiring I found correct?
  2. How can I adapt it to be able to both send and receive it? Do I need two RS485's and have one of them connected to the RX and the other one to the TX pin? Or both to the RX pin? I'm pretty lost and I hope that one of you can point me in the right direction.

(oh and I'm sorry if this is the wrong subforum, just move my post)

The wiring diagram shows the RS485 module hard wired for receiving only to control the direction you need to wire the ~RE/DE pins to a digital pin on the Arduino so you can set them either high (output) or low (input).

You can also cause problems when trying to use Serial at the same time as the DMXSerial library unless your using a separate Serial port.

A quick and dirty (with no opto isolation) here can be switched but the supplied code only does send.

if I would use 2 RS485's (one connected to a male xlr and one connected to a female xlr) would Ihardwire both? Without the need to change the direction?

You can also cause problems when trying to use Serial at the same time as the DMXSerial library unless your using a separate Serial port.

what do you mean by this and how would I circumvent it?

its_u:
if I would use 2 RS485's (one connected to a male xlr and one connected to a female xlr) would Ihardwire both? Without the need to change the direction?
Yes, just hardwire one for output and the other for input and connect to the correct RX/TX pin on the Arduino.

what do you mean by this and how would I circumvent it?
You need to use an Arduino with more than one Serial port. The Leonardo variant with a native USB port is ideal for this and that is what I used for the project I linked to as I needed Serial for control interface and Serial1 for DMX.