Equalation of ports

I want to do custom nodefor eqaulation of Nodemcu ports in Arduino ports, because standart equal node don’t work with ports type. How can i compare ports in xod?

You have to read the ports, then compare the results. This is pretty straight forward with digital-read, but analog-read will seldom have 2 ports exactly equal. For analog compare, you probably need to see it they are close rather than equal (because 0.01 is not equal to 0.009).

maybe my english is not so good, i want to compare ports type, so i will have node that input for example “d5” and output “d7”. I use swutch-case for it but comparator say that equal node cant compare ports type

I don’t understand. The only “port type” I know of is digital or analog for input and digital or PWM for output. Analog & PWM ports can be used as digital ports.

If you are talking about comparing values for data-type of “port”, you are probably doing something wrong. If you want to refer to port D7, why are you using D5 and trying to map that to D7?

If you want to change ports for different hardware, you might need to make that change manually before compiling for different hardware. You could simplify this by using constant-port & to-bus/from-bus. For example, to specify D7 for button1:
image
This allows you to use the from-bus “btn1” anywhere you want that port. If you need to change it to D5 for another board, you only change the one constant-port node that feeds into the to-bus “btn1”


there is comparsion of ports NodeMCU and arduino for example if i choose port D16 in XOD for output, it will output on the D0 port on plate. So i want use plate port without remembering its comparsion to arduin ports

I’m guessing you would have to create your own mapping node using not-implemented-in-xod to use C++ code to do your compare/mapping…