Video mixer


I am working on a video mixer project for vMix. It is a simple midi controller with illuminated push buttons. I have a preview and a program button row. Which camera is on air, the given number of button is illuminated. That was not so difficult to program. But I have a problem now. When I change the preview with the program by using the fader, of course it dous not change, as no button was pressed.

Example: camera 6 is in program and camera 2 in preview. When i move the fader, these 2 change place and cam 2 will be in program and cam 6 in preview.

I have 10 program and 10 preview buttons. How can I program the arduino that if any of program led is on and any of preview led is also on, when I move the fader, they change place?

Thank you very much in advance!

Please post the code you have so far (and schematics)

That helps to understand the logic of the application.

please use code tags → </> button