RX and TX are communicating with each other. On the VESC side I have tried UART and nunchuck in the app configuration tab in BLDC tool and set control mode to current. But still no response from the VESC. I'm going to check the connections I'm clearly doing something wrong
Serialmonitor says f. I have connected the TX from the VESC to RX of the arduino and vice versa.
EDIT:
I did had a bad connection between the vesc and RX arduino. The arduino is now getting data from the VESC (RX light is blinking and serial monitor does not say "failed to get data from UART") but the VESC still does not respond. The baud rate is set at 115200. Aslo when reading the RX arduino over usb, only the y-value of the thumbstick changes, even if I swap the pins used for x and y, the same problem occurs.
EDIT2:
I tested the VESC UART output with the VESCUARTcontrol example, loaded on a arduino, and I do see data comming in from the VESC (No problems on the VESC side).
I now soldered the wires TX side as mentioned in the config.h and tested if the data from the TX side is arriving at the RX side. All buttons work and only JOY-Y works, even If I swap pin A0 for A1 in the config.h (still the same problem as mentioned above. I did not change the TX sketch this time).
The configuration for the VESC is still a bit unclear. What do I use? UART or Nunchuk? Because the VESC does not respond on any input.
EDIT3:
Got it almost working. I had an older VescUARTcontrol library installed

. In BLDC tool I can now see the position of the thumbstick in the nunchuk tab.
I now have a problem with the controls. I have to keep the Z button pressed to make the motor spin. If I release the Z button, the motor keeps going on. If I press the Z button again, the motor stops spinning but the next time I throttle it up it spins in the other direction.
Cruise control also has some problems. If I spin the motor and press the cruise control (C) button then the motor will maintain the speed. If I release the C button, the motor keeps on spinning. I can not change the speed of the motor with the thumbstick.
I don't think the motor/VESC should behave as discribed above.
If I power off the TX, the motor stops (as it should do

).
I think my buttons are reversed somehow.
EDIT4
I reversed the behaviour of the c and z buttons in the sketch and changed some nrf24l01 settings because I had some connection issues. Now the controller works great!