I think you may be right about that, i will try to implement your code
But for the record
The connections to the l298n is defined:
41 enables one H-bridge circuit on the board and 2-3 are the outputs which the PWM signals Should be sent to.
42 enables the second H-bridge circuit on the board, where 4-5 are the outputs with PWM.
This continues for 3 boards
I still have no Clue on how the lights Should be controlled, how i turn the on with the switch and handle the debounce, and still PWM the lights