You should have created a default robot project, and there will be default code already in the vi's. The vi's you want to modify are under the CompactRIO Target -> Team Code
There are three parts:
- The code labeled Begin.vi goes in Begin.vi
- The code labeled Teleop.vi goes in Teleop.vi
- The code labeled Finish,vi goes in Finish.vi
You also have to add a second
Joystick 2 in Begin.vi, but you can highlight and copy/paste the default code for Joystick 1, then change the USB and the name.
For the drive code there will be conflicting default code, so remove that or at least make sure the PWMs referenced in Begin.vi are different than the ones you are using.