Unresponsive Arduino DUE R3

Hi, I have an Arduino DUE R3 and a huge code,
I tested this code with Arduino Nano (with the necessary changes) and it worked, now I've tested it with DUE (the board the code is made for) and it didn't work.

This is the schematics and PCB in case you want to take a look at:

there are missing connections in purpose.

I didn't find any electrical errors in the boards and connections which leads me to the code,
I've attached the project code (ArduinoDueCode.ino).

So I've uploaded the program and using Serial.print and Serial monitor I've seen the code runs the setup code but doesn't print anything tot he LCS (It is connected to 3.3V when it should use 5V, maybe that's why), but the buttons and the encoder aren't working.

The variable "contador" is the counter of the Encoder.

Is there anything in the code preventing it to work well with DUE?
The compiler didn't find errors, unfortunately.

ArduinoDueCode.ino (27.3 KB)

ArduinoDueCode.ino (27.3 KB)

Also, what programmer should I be using?
Please check the attached print screen to see if I am using the correct programmer.

Screenshot_1.png

Update:

I managed to get the button working, there was a line of code missing.

Now the code behavior is weird but I'll investigate.

Everything solved.